25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 
 
 
 
 

40 satır
1.8 KiB

  1. ---
  2. - name: Installing required Python mysqldb module for Ansible to manage databases
  3. apt: name=python-pymysql
  4. - name: Ensure mysql root password is updated for all root accounts
  5. mysql_user:
  6. name: root
  7. host: localhost
  8. login_unix_socket: /var/run/mysqld/mysqld.sock
  9. password: "{{ ispmail_mysql_root_password }}"
  10. priv: '*.*:ALL,GRANT'
  11. check_implicit_admin: true
  12. #become: yes
  13. #notify: Restart MySQL
  14. - name: Creating my-cnf for root user
  15. template: src=root-my-cnf.j2 dest=/root/.my.cnf mode=0600
  16. - name: creating mailserver MySQL database
  17. mysql_db: name=mailserver login_password="{{ ispmail_mysql_root_password }}"
  18. - name: creating Roundcube MySQL database
  19. mysql_db: name=roundcube
  20. - name: copying MySQL database schema to server
  21. copy: src=schema.sql dest=/tmp
  22. - name: setting up SQL schema of mailserver database
  23. mysql_db: name=mailserver state=import target=/tmp/schema.sql
  24. # - name: set the MySQL root user's password
  25. # mysql_user: name=root password={{ispmail_mysql_root_password}}
  26. - name: creating MySQL user to read the mailserver database
  27. mysql_user: name=mailuser password={{ispmail_mysql_mailuser_password}} priv=mailserver.*:SELECT,INSERT,UPDATE,DELETE
  28. - name: creating MySQL user for roundcube
  29. mysql_user: name=roundcube password={{ispmail_mysql_roundcube_password}} priv=roundcube.*:ALL
  30. - name: copying MySQL test data to server
  31. copy: src=test.sql dest=/tmp
  32. when: ispmail_populate_test_data == true
  33. - name: populating the database with test data
  34. mysql_db: name=mailserver state=import target=/tmp/test.sql
  35. when: ispmail_populate_test_data == true
  36. # - name: set the MySQL root user's password
  37. # mysql_user: name=root password={{ispmail_mysql_root_password}}
  38. # - name: Create root's .my.cnf
  39. # template: src=my-cnf.j2 dest=/root/.my.cnf mode=0600