Skip to content

Instantly share code, notes, and snippets.

@elleryq
Created September 3, 2015 09:09
Show Gist options
  • Save elleryq/32e5dd45846f585a3d8a to your computer and use it in GitHub Desktop.
Save elleryq/32e5dd45846f585a3d8a to your computer and use it in GitHub Desktop.
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}}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment