Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
How to run an Ansible playbook locally
  • using Ansible command line:
ansible-playbook --connection=local playbook.yml
  • using inventory: ansible_connection=local
  • using Ansible configuration file:
transport = local
  • using playbook header:
- hosts:
  connection: local

This comment has been minimized.

Copy link

commented Oct 15, 2018

The first option only works as ansible-playbook --connection=local --inventory, playbook.yml
Comma is essential, otherwise it's treated like file name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.