https://docs.ansible.com/ Ansible host to connect should have:

  • Python interpreter
  • SSH enabled
  • ansible can be installed on several hosts
  • playbook executed from controller host

To execute an Ansible playbook in the most basic way, you will need two main files, the inventory and the playbook, as mentioned.

ansible-playbook -i inventory playbookfile.yml

The ansible-playbook program and command line utility are used to execute the playbook. First, you will enter the ansible-playbook command, and use the (-i) flag to tell Ansible what inventory file to use. Note There are options so you are not required to use (-i) to specify an inventory file.


<
Previous Post
Py_os_system_subrocess
>
Next Post
NETCONF