Skip to content

Instantly share code, notes, and snippets.

@dasgoll
Forked from alces/ansible_local_playbooks.md
Created February 9, 2019 15:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dasgoll/eb29618e4dc6f972390406dccc093249 to your computer and use it in GitHub Desktop.
Save dasgoll/eb29618e4dc6f972390406dccc093249 to your computer and use it in GitHub Desktop.
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment