Skip to content

Instantly share code, notes, and snippets.

@Spredzy
Last active October 30, 2017 08:03
Show Gist options
  • Save Spredzy/ba966f84f394a74959f34d50c11de05c to your computer and use it in GitHub Desktop.
Save Spredzy/ba966f84f394a74959f34d50c11de05c to your computer and use it in GitHub Desktop.
---
- hosts: localhost
tasks:
- name: echo Ansible
shell: echo "Ansible"
register: product
when: True
- name: echo AnotherProduct
shell: echo "AnotherProduct"
register: product
when: False
- name: echo product
shell: echo "{{ product.stdout }}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment