Add mysql_state and mysql_enabled_on_startup options.

pull/63/head
Jeff Geerling 9 years ago
parent db5f7797e9
commit 64e4ed6e08
  1. 5
      README.md
  2. 3
      defaults/main.yml
  3. 2
      tasks/configure.yml

@ -20,6 +20,11 @@ The home directory inside which Python MySQL settings will be stored, which Ansi
The MySQL root user account password.
mysql_state: started
mysql_enabled_on_startup: yes
MySQL's state (`started`, `stopped`, `restarted`, `reloaded`), and whether to enable MySQL on startup.
mysql_databases: []
The MySQL databases to create. A database has the values `name`, `encoding` (defaults to `utf8`), `collation` (defaults to `utf8_general_ci`) and `replicate` (defaults to `1`, only used if replication is configured). The formats of these are the same as in the `mysql_db` module.

@ -3,6 +3,9 @@ mysql_user_home: /root
mysql_root_username: root
mysql_root_password: root
mysql_state: started
mysql_enabled_on_startup: yes
# Pass in a comma-separated list of repos to use (e.g. "remi,epel"). Used only
# for RedHat systems (and derivatives).
mysql_enablerepo: ""

@ -9,4 +9,4 @@
notify: restart mysql
- name: Ensure MySQL is started and enabled on boot.
service: "name={{ mysql_daemon }} state=started enabled=yes"
service: "name={{ mysql_daemon }} state={{ mysql_state }} enabled={{ mysql_enabled_on_startup }}"