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
질문됨 4년 전544회 조회
1개 답변
0
수락된 답변

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
전문가
답변함 4년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠