Browse Source

Avoid setting the MySQL root password

It would break idempotency of the Ansible role
merge-requests/1/merge
Christoph Haas 10 years ago
parent
commit
75bfe041c7
1 changed files with 4 additions and 2 deletions
  1. +4
    -2
      roles/ispmail-database/tasks/main.yml

+ 4
- 2
roles/ispmail-database/tasks/main.yml View File

@@ -7,8 +7,6 @@
copy: src=schema.sql dest=/tmp copy: src=schema.sql dest=/tmp
- name: setting up SQL schema of mailserver database - name: setting up SQL schema of mailserver database
mysql_db: name=mailserver state=import target=/tmp/schema.sql mysql_db: name=mailserver state=import target=/tmp/schema.sql
- name: set the MySQL root user's password
mysql_user: name=root password={{ispmail_mysql_root_password}} state=present
- name: creating MySQL user to read the mailserver database - name: creating MySQL user to read the mailserver database
mysql_user: name=mailuser password={{ispmail_mysql_mailuser_password}} priv=mailserver.*:SELECT,INSERT,UPDATE,DELETE state=present mysql_user: name=mailuser password={{ispmail_mysql_mailuser_password}} priv=mailserver.*:SELECT,INSERT,UPDATE,DELETE state=present
- name: copying MySQL test data to server - name: copying MySQL test data to server
@@ -17,3 +15,7 @@
- name: populating the database with test data - name: populating the database with test data
mysql_db: name=mailserver state=import target=/tmp/test.sql mysql_db: name=mailserver state=import target=/tmp/test.sql
when: ispmail_populate_test_data == true when: ispmail_populate_test_data == true
# - name: set the MySQL root user's password
# mysql_user: name=root password={{ispmail_mysql_root_password}} state=present
# - name: Create root's .my.cnf
# template: src=my-cnf.j2 dest=/root/.my.cnf mode=0600

Loading…
Cancel
Save