User Tools

Site Tools


ansible_intro

This is an old revision of the document!


Running script locally

By default ansible will run against the hosts in the following file: /etc/ansible/hosts

If you wish to run ansible playbooks from your local machine, you can define the following at the top of your playbook:

---
- hosts: 127.0.0.1
connection: local

You can also run ansible commands locally with the following command:
# ansible localhost -a "/bin/echo hello"
localhost | success | rc=0 >>
hello

ansible_intro.1485858903.txt.gz · Last modified: 2024/05/23 07:26 (external edit)

Except where otherwise noted, content on this wiki is licensed under the following license: Public Domain
Public Domain Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki