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
posta 4 anni fa544 visualizzazioni
1 Risposta
0
Risposta accettata

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
ESPERTO
con risposta 4 anni fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande