mirror of
https://github.com/saltstack-formulas/mysql-formula.git
synced 2025-04-16 01:30:25 +00:00
debconf: allow configurable optional root pwd
This commit is contained in:
parent
bb17c3c512
commit
1071effbe1
1 changed files with 7 additions and 3 deletions
|
@ -31,8 +31,12 @@ include:
|
|||
{% set debconf_root_password_again = mysql.server + '/re-root-pass' %}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% set debconf_root_password = 'mysql-server/root_password' %}
|
||||
{% set debconf_root_password_again = 'mysql-server/root_password_again' %}
|
||||
{% if salt['grains.get']('osmajorrelease')|int < 9 or not salt['grains.get']('os')|lower == 'debian' %}
|
||||
{% set debconf_root_password = 'mysql-server/root_password' %}
|
||||
{% set debconf_root_password_again = 'mysql-server/root_password_again' %}
|
||||
{% else %}
|
||||
{% set debconf_root_password = False %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
mysql_debconf_utils:
|
||||
|
@ -49,7 +53,7 @@ mysql_debconf:
|
|||
- require:
|
||||
- pkg: mysql_debconf_utils
|
||||
|
||||
{% if salt['grains.get']('osmajorrelease')|int < 9 or not salt['grains.get']('os')|lower == 'debian' %}
|
||||
{% if debconf_root_password %}
|
||||
mysql_password_debconf:
|
||||
debconf.set:
|
||||
- name: mysql-server
|
||||
|
|
Loading…
Add table
Reference in a new issue