Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
How to run an Ansible playbook locally
  • using Ansible command line:
ansible-playbook --connection=local 127.0.0.1 playbook.yml
  • using inventory:
127.0.0.1 ansible_connection=local
  • using Ansible configuration file:
[defaults]
transport = local
  • using playbook header:
- hosts: 127.0.0.1
  connection: local
@lihongjie0209
Copy link

lihongjie0209 commented Jul 22, 2020

ansible-playbook -c local -i localhost, ini.yaml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment