Merge "Allow mysql_username and mysql_password to be passed via env var."
This commit is contained in:
commit
6e56f0742f
@ -136,6 +136,16 @@
|
|||||||
write_priv: ".*"
|
write_priv: ".*"
|
||||||
read_priv: ".*"
|
read_priv: ".*"
|
||||||
no_log: true
|
no_log: true
|
||||||
|
- name: "Set mysql_username if environment variable mysql_user is set"
|
||||||
|
set_fact:
|
||||||
|
mysql_username: "{{ lookup('env', 'mysql_user') }}"
|
||||||
|
when: lookup('env', 'mysql_user') | length > 0
|
||||||
|
no_log: true
|
||||||
|
- name: "Set mysql_password if environment variable mysql_pass is set"
|
||||||
|
set_fact:
|
||||||
|
mysql_password: "{{ lookup('env', 'mysql_pass') }}"
|
||||||
|
when: lookup('env', 'mysql_pass') | length > 0
|
||||||
|
no_log: true
|
||||||
- name: "MySQL - Creating DB"
|
- name: "MySQL - Creating DB"
|
||||||
mysql_db:
|
mysql_db:
|
||||||
name: "ironic"
|
name: "ironic"
|
||||||
|
@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- Add support for passing a Mysql username and password
|
||||||
|
via environment variables mysql_user for username and
|
||||||
|
mysql_pass for password. Useful for cases where Mysql
|
||||||
|
server may be existing and have usernames with password
|
||||||
|
already set.
|
Loading…
Reference in New Issue
Block a user