Skip to content

Instantly share code, notes, and snippets.

@klauern
Last active March 30, 2016 16:55
Show Gist options
  • Save klauern/393fb2a7890463912147e43aeef2c7b6 to your computer and use it in GitHub Desktop.
Save klauern/393fb2a7890463912147e43aeef2c7b6 to your computer and use it in GitHub Desktop.
- name: Echo something
shell: echo "Hi"
#!/usr/bin/env ansible-playbook
---
- hosts: localhost
# switch between vars and vars_prompt, and I would expect the same output both times
#vars:
# should_echo: True
vars_prompt:
- name: should_echo
default: True
private: no
prompt: "Should I Echo it?"
tasks:
- debug: var=should_echo
- include: echo-task.yml
when: should_echo == True
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment