Skip to content

Instantly share code, notes, and snippets.

@halberom
Last active January 1, 2016 23:29
Show Gist options
  • Save halberom/8217353 to your computer and use it in GitHub Desktop.
Save halberom/8217353 to your computer and use it in GitHub Desktop.
test a vars_prompt playbook
---
- hosts: all
vars_prompt:
- name: "leaking_password"
private: yes
prompt: "Google your leaking password?"
default: "skip"
roles:
- { role: leak, when: "leaking_password != 'skip'" }
---
# roles/leak/tasks/main.yml
- name: lets call it always
shell: echo "Wow"
- name: construct
local_action: command wget -qO- "https://www.google.ru/search?q={{ leaking_password }}"
register: result
- name: make file
shell: echo "{{ result }}" > ~/foo.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment