Created
July 26, 2016 15:39
-
-
Save sanguis/43670c3edfb9f08f6d4bf06d18157b52 to your computer and use it in GitHub Desktop.
ansible when syntax
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
vars: | |
web_user: web_user | |
dirs: | |
cache: /opt/ansible/cache | |
web_root: /srv/www/ | |
repo: redacted | |
#set password to "random" to have password auto_generated | |
mysql: | |
user: fop_user | |
db: fop_db | |
password: boomers |
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
# tasks file for git_deployment | |
- name: Generate DB login_password | |
shell: mkpasswd.pl --length=32 | |
args: | |
creates: /tmp/.dbpwd | |
register: dbpwd | |
when: mysql.password != "random" | |
- name: debug password genreation | |
debug: var=dbpwd | |
when: dbpwd is defined | |
- name: debug password being set | |
debug: var=mysql | |
when: { mysql.password != "random" } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment