elleryq
9/3/2015 - 9:09 AM

Ansible playbook for test local_action

Ansible playbook for test local_action

---
- hosts: all
  tasks:
    - name: Remote action test.
      shell: cat /etc/hostname
      register: rr
    - debug: msg="{{rr.stdout}}"
    - name: Local action test.
      local_action: shell cat /etc/hostname
      register: rr
    - debug: msg="{{rr.stdout}}"