Skip to content

Instantly share code, notes, and snippets.

@wyw
Forked from alces/ansible_local_playbooks.md
Created December 20, 2018 06:01
Show Gist options
  • Save wyw/32ed82c3ba1e0b200276754e67e490f8 to your computer and use it in GitHub Desktop.
Save wyw/32ed82c3ba1e0b200276754e67e490f8 to your computer and use it in GitHub Desktop.

Revisions

  1. @alces alces revised this gist May 23, 2016. 1 changed file with 11 additions and 4 deletions.
    15 changes: 11 additions & 4 deletions ansible_local_playbooks.md
    Original file line number Diff line number Diff line change
    @@ -1,17 +1,24 @@
    1. using Ansible command line:
    * using Ansible command line:

    ```bash
    ansible-playbook --connection=local 127.0.0.1 playbook.yml
    ```
    2. using inventory:

    * using inventory:

    ```ini
    127.0.0.1 ansible_connection=local
    ```
    3. using Ansible configuration file:

    * using Ansible configuration file:

    ```ini
    [defaults]
    transport = local
    ```
    4. using playbook header:

    * using playbook header:

    ```yaml
    - hosts: 127.0.0.1
    connection: local
  2. @alces alces created this gist May 23, 2016.
    18 changes: 18 additions & 0 deletions ansible_local_playbooks.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,18 @@
    1. using Ansible command line:
    ```bash
    ansible-playbook --connection=local 127.0.0.1 playbook.yml
    ```
    2. using inventory:
    ```ini
    127.0.0.1 ansible_connection=local
    ```
    3. using Ansible configuration file:
    ```ini
    [defaults]
    transport = local
    ```
    4. using playbook header:
    ```yaml
    - hosts: 127.0.0.1
    connection: local
    ```