author avatar

mahesh.bhosle

Fri Apr 05 2024

We can leverage the AWS Systems Manager service to execute the Ansible scripts on the EC2 hosts, this removes the overhead of maintaining SSH keys and other instance details. How it is done: • Prerequisites: ◦ EC2 instance should have an IAM role attached for SSM ◦ Ansible should be installed on the instance • In the AWS System Manager go to State Manager and create a new association • The association details will include: association name, Document, Ansible playbook, Target selection, schedule, and Rate control • Based on the Association configuration, the playbook will be executed. #automation #awsssm #ansible