mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
cleaner Ansible messaging
This commit is contained in:
parent
e662025c4b
commit
504264a11f
1 changed files with 8 additions and 8 deletions
|
@ -68,17 +68,17 @@
|
||||||
# 'localhost' needs to be the last item for idempotency, see
|
# 'localhost' needs to be the last item for idempotency, see
|
||||||
# http://ansible.cc/docs/modules.html#mysql-user
|
# http://ansible.cc/docs/modules.html#mysql-user
|
||||||
# unfortunately it still doesn't work
|
# unfortunately it still doesn't work
|
||||||
- name: update mysql root password for localhost root accounts
|
- name: Update MySQL root password for localhost root accounts
|
||||||
mysql_user: name=root host={{ item }} password={{ mysql_root_password }} priv=*.*:ALL,GRANT
|
mysql_user: name=root host={{ item }} password={{ mysql_root_password }} priv=*.*:ALL,GRANT
|
||||||
with_items:
|
with_items:
|
||||||
- localhost
|
- localhost
|
||||||
when: mysql_enabled
|
when: mysql_enabled
|
||||||
|
|
||||||
- name: copy .my.cnf file with root password credentials
|
- name: Copy .my.cnf file with root password credentials
|
||||||
template: src=my.cnf.j2 dest=/root/.my.cnf owner=root mode=0600
|
template: src=my.cnf.j2 dest=/root/.my.cnf owner=root mode=0600
|
||||||
when: mysql_enabled
|
when: mysql_enabled
|
||||||
|
|
||||||
- name: update mysql root password for all remaining root accounts
|
- name: Update mysql root password for all remaining root accounts
|
||||||
mysql_user: name=root host={{ item }} password={{ mysql_root_password }} priv=*.*:ALL,GRANT
|
mysql_user: name=root host={{ item }} password={{ mysql_root_password }} priv=*.*:ALL,GRANT
|
||||||
with_items:
|
with_items:
|
||||||
# - "{{ iiab_hostname }}.{{ iiab_domain }}"
|
# - "{{ iiab_hostname }}.{{ iiab_domain }}"
|
||||||
|
@ -86,15 +86,15 @@
|
||||||
- ::1
|
- ::1
|
||||||
when: mysql_enabled
|
when: mysql_enabled
|
||||||
|
|
||||||
- name: delete anonymous MySQL server user for {{ ansible_hostname }}
|
- name: Delete anonymous MySQL server user for {{ ansible_hostname }}
|
||||||
mysql_user: user="" host="{{ ansible_hostname }}" state="absent"
|
mysql_user: user="" host="{{ ansible_hostname }}" state="absent"
|
||||||
when: mysql_enabled
|
when: mysql_enabled
|
||||||
|
|
||||||
- name: delete anonymous MySQL server user for localhost
|
- name: Delete anonymous MySQL server user for localhost
|
||||||
mysql_user: user="" state="absent"
|
mysql_user: user="" state="absent"
|
||||||
when: mysql_enabled
|
when: mysql_enabled
|
||||||
|
|
||||||
- name: remove the MySQL test database
|
- name: Remove the MySQL test database
|
||||||
mysql_db: db=test state=absent
|
mysql_db: db=test state=absent
|
||||||
when: mysql_enabled
|
when: mysql_enabled
|
||||||
|
|
||||||
|
@ -106,7 +106,7 @@
|
||||||
when: not mysql_enabled
|
when: not mysql_enabled
|
||||||
|
|
||||||
|
|
||||||
- name: add mysql to service list
|
- name: Add mysql to service list
|
||||||
ini_file: dest='{{ service_filelist }}'
|
ini_file: dest='{{ service_filelist }}'
|
||||||
section=mysql
|
section=mysql
|
||||||
option='{{ item.option }}'
|
option='{{ item.option }}'
|
||||||
|
@ -115,6 +115,6 @@
|
||||||
- option: name
|
- option: name
|
||||||
value: mysql-database
|
value: mysql-database
|
||||||
- option: description
|
- option: description
|
||||||
value: '"mySQL is a widely used database service on the Internet which runs on many platforms, and is often offered and available at hosting Internet Service Providers"'
|
value: '"MySQL is a widely used database service on the Internet which runs on many platforms, and is often offered and available at hosting Internet Service Providers"'
|
||||||
- option: enabled
|
- option: enabled
|
||||||
value: "{{ mysql_enabled }}"
|
value: "{{ mysql_enabled }}"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue