You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
1.0 KiB
34 lines
1.0 KiB
3 years ago
|
- name: "MySQL set root password"
|
||
|
become: yes
|
||
|
mysql_user:
|
||
|
login_user: "{{ mysql.user | default('root') }}"
|
||
|
login_password: "{{ mysql.password }}"
|
||
|
login_host: "{{ mysql.host | default('localhost') }}"
|
||
|
login_port: "{{ mysql.port | default('3306') }}"
|
||
|
user: "root"
|
||
|
password: "{{ icinga2.mysql.password }}"
|
||
|
host: "localhost"
|
||
|
when: use_local_db_instance
|
||
|
|
||
|
- name: "Delete anonymous MySQL server user"
|
||
|
become: true
|
||
|
mysql_user:
|
||
|
login_user: "{{ mysql.user | default('root') }}"
|
||
|
login_password: "{{ mysql.password }}"
|
||
|
login_host: "{{ mysql.host | default('localhost') }}"
|
||
|
login_port: "{{ mysql.port | default('3306') }}"
|
||
|
user: ""
|
||
|
state: absent
|
||
|
when: use_local_db_instance
|
||
|
|
||
|
- name: "Remove the MySQL test database"
|
||
|
become: true
|
||
|
mysql_db:
|
||
|
login_user: "{{ mysql.user | default('root') }}"
|
||
|
login_password: "{{ mysql.password }}"
|
||
|
login_host: "{{ mysql.host | default('localhost') }}"
|
||
|
login_port: "{{ mysql.port | default('3306') }}"
|
||
|
db: "test"
|
||
|
state: absent
|
||
|
when: use_local_db_instance
|