Ansible installation requirements for EC2 instances (managed nodes)

0

Reading the documentation about the execution of Ansible Playbooks on SSM (AWS-ApplyAnsiblePlaybooks), I've found the sentence: Ansible must be pre-installed on the instances. But, searching more info about the Ansible, we can confirm that Ansible installation only is needed when the local computer is a Control Node, used to create or manage the Ansible's scripts. See this section on Ansible article:

"You only need to install it on one machine (which could easily be a laptop) and it can manage an entire fleet of remote machines from that central point. When Ansible manages remote machines, it does not leave software installed or running on them, so there’s no real question about how to upgrade Ansible when moving to a new version."

So, why we need to deploy Ansible on EC2 previously to run SSM documents with Ansible? We can confirm again in this doc section "Installed Dependencies".

profile pictureAWS
preguntada hace 4 años544 visualizaciones
1 Respuesta
0
Respuesta aceptada

When you use SSM to run an Ansible document, it actually executes the Ansible command on the host that you designate. All SSM documents have to run on an EC2 host so you need to have one host with ansible installed. This host can then connect to other hosts and run commands as stated in an ansible playbook. You can even use the AWS dynamic inventory boto script to group and define hosts (https://docs.ansible.com/ansible/latest/user_guide/intro_dynamic_inventory.html). But this one host with ansible is required.

SSM document is just a remote script runner that has to connect to a host and run the script so that host has to have all the tools installed are required by the script.

AWS
EXPERTO
respondido hace 4 años

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas