Skip to content
Snippets Groups Projects
Commit c2c1e395 authored by Wolodja Wentland's avatar Wolodja Wentland
Browse files

Ensure that debconf-utils is installed on Debian systems

debconf.set which is used in mysql.server has a dependency on debconf-utils. If
it is not installed the password will not be set and is cumbersome to change
later on.
parent 940a6e1a
No related branches found
No related tags found
No related merge requests found
...@@ -5,6 +5,7 @@ Ubuntu: ...@@ -5,6 +5,7 @@ Ubuntu:
client: mysql-client client: mysql-client
service: mysql service: mysql
python: python-mysqldb python: python-mysqldb
debconf_utils: debconf-utils
config: config:
file: /etc/mysql/my.cnf file: /etc/mysql/my.cnf
sections: sections:
...@@ -48,6 +49,7 @@ Debian: ...@@ -48,6 +49,7 @@ Debian:
client: mysql-client client: mysql-client
service: mysql service: mysql
python: python-mysqldb python: python-mysqldb
debconf_utils: debconf-utils
config: config:
file: /etc/mysql/my.cnf file: /etc/mysql/my.cnf
sections: sections:
......
...@@ -7,6 +7,10 @@ ...@@ -7,6 +7,10 @@
{% if mysql_root_password %} {% if mysql_root_password %}
{% if os_family == 'Debian' %} {% if os_family == 'Debian' %}
mysql_debconf_utils:
pkg.installed:
- name: {{ mysql.debconf_utils }}
mysql_debconf: mysql_debconf:
debconf.set: debconf.set:
- name: mysql-server - name: mysql-server
...@@ -16,6 +20,8 @@ mysql_debconf: ...@@ -16,6 +20,8 @@ mysql_debconf:
'mysql-server/start_on_boot': {'type': 'boolean', 'value': 'true'} 'mysql-server/start_on_boot': {'type': 'boolean', 'value': 'true'}
- require_in: - require_in:
- pkg: mysqld - pkg: mysqld
- require:
- pkg: mysql_debconf_utils
{% elif os_family == 'RedHat' %} {% elif os_family == 'RedHat' %}
mysql_root_password: mysql_root_password:
cmd.run: cmd.run:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment