help with a cloudwatchevent_rule problem

76 views
Skip to first unread message

Derek Gibson

unread,
Sep 21, 2017, 4:05:59 AM9/21/17
to Ansible Project
I want to be able to update ecs scheduled tasks via ansible, using 

  - cloudwatchevent_rule:
      name: ansitest
      schedule_expression: "cron(0 20 * * ? *)"
      description: test from ansible
      targets:
        - id: ansitest
          arn: arn:aws:ecs:us-east-1:111111111:cluster/ecs-cluster-test
          ecs_parameters:
            task_definition_arn: arn:aws:ecs:us-east-1:11111111:task-definition/some-app:123
            task_count: 1

am getting the following error:

ClientError: An error occurred (ValidationException) when calling the PutTargets operation: TaskDefinitionArn is empty for target ansitest

My questions -
Firstly, is cloudwatchevent_rule the correct command for updating ecs scheduled tasks?
Secondly, is the format above correct?


thanks
Derek

Derek Gibson

unread,
Sep 21, 2017, 4:11:54 AM9/21/17
to Ansible Project
The below error was on 2.3.2.0
 I just upgraded to 2.4.0.0 and got the following -

The error was: Unknown parameter in Targets[0]: "EcsParameters", must be one of: Id, Arn, Input, InputPath

So is this maybe a bugged/broken feature?
Reply all
Reply to author
Forward
0 new messages