I need to create an EC2 Instance and launch it to an existing ECS cluster. I know the same can be done manually through AWS console by executing following shell command on EC2 launch :
#!/bin/bash
echo ECS_CLUSTER=your_cluster_name >> /etc/ecs/ecs.config
How can i achieve the same using Ansible playbook?