Eerste grote update:

- Wissen standaard accounts
 - Zetten root password
 - Aanmaken databases
 - Aanmaken gebruikers per database
 - Lege files klaar zetten voor backup, slave, config
This commit is contained in:
Marcel Nijenhof
2021-05-06 14:46:09 +02:00
parent bf1c4d86e7
commit cff00f04c7
18 changed files with 143 additions and 89 deletions

View File

@@ -4,30 +4,26 @@
name: root
host: "{{ ansible_fqdn }}"
state: absent
- name: "Create lavs user for {{ ansible_fqdn }}"
- name: Remove remote root account (::1)
community.mysql.mysql_user:
name: lavs
password: "{{ db_lavs_password }}"
host: "{{ db_remote_host }}"
state: present
priv:
'lavs_alfresco.*': 'ALL'
- name: "Create zm_user user for {{ ansible_fqdn }}"
name: root
host: ::1
state: absent
- name: Remove remote root account (127.0.0.1)
community.mysql.mysql_user:
name: zm_user
password: "{{ db_zm_user_password }}"
host: "{{ db_remote_host }}"
state: present
priv:
'lavs_zm.*': 'ALL'
- name: "Create lars_user user for {{ ansible_fqdn }}"
name: root
host: 127.0.0.1
state: absent
- name: Set root password for root@localhost
community.mysql.mysql_user:
name: lars_user
password: "{{ db_lars_user_password }}"
host: "{{ db_remote_host }}"
name: root
host: localhost
password: "{{ mysql_root_password }}"
state: present
priv:
'lavs_systeem.*': 'ALL'
- name: Create my.cnf
ansible.builtin.template:
src: my.cnf.j2
dest: /root/.my.cnf
owner: root
group: root
mode: 0600