Run Ansible Playbook Locally
Last updated
At times, we require an Ansible Playbook to run locally on the host server. Few examples are given below -
ansible-playbook --connection=local --inventory 127.0.0.1, playbook_name.ymlWe can also, add the host in an inventory file such as -
127.0.0.1 ansible_connection=local[defaults]
transport = local- hosts: 127.0.0.1
connection: localSource: GitHub Gist - Ansible playbook Locally
Reference(s):
Last updated