Skip to content

Instantly share code, notes, and snippets.

@willthames
Created May 13, 2016 00:33
Show Gist options
  • Save willthames/d0209bd4c8c3664c1490b1bb24b4dc00 to your computer and use it in GitHub Desktop.
Save willthames/d0209bd4c8c3664c1490b1bb24b4dc00 to your computer and use it in GitHub Desktop.
ansible register test
ansible-playbook hostname.yml -e hosts=some_ansible_group -vv
- hosts: "{{hosts}}"
tasks:
- name: get hostname
command: hostname
register: hostname
- name: print hostname
debug: var=hostname
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment