Last active
January 1, 2016 23:29
-
-
Save halberom/8217353 to your computer and use it in GitHub Desktop.
test a vars_prompt playbook
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: all | |
vars_prompt: | |
- name: "leaking_password" | |
private: yes | |
prompt: "Google your leaking password?" | |
default: "skip" | |
roles: | |
- { role: leak, when: "leaking_password != 'skip'" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
# 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