Basic MySQL configuration

This commit is contained in:
Salt 2020-02-05 23:43:22 -06:00
parent 823b9bb060
commit 35fd9dd3ab
2 changed files with 21 additions and 1 deletions

View File

@ -7,13 +7,19 @@
- user - user
- hosts: tag_role_nextcloud - hosts: tag_role_nextcloud
vars: vars:
mysql_root_password: !vault |
$ANSIBLE_VAULT;1.1;AES256
62316565376333396465333931356163343363663063636233653536373033396230626639613964
3037613839373833646234626236643430393364643131610a333539373533663434373935376130
65323365313465316635646465376665616132653832316362363535366563363863636530313666
3036393134386131310a643734363261633166636263343538313533393738323934303137343163
39636637643035616236663364663562366133613233313139623937313531343564
acme_directory: "https://acme-staging-v02.api.letsencrypt.org/directory" acme_directory: "https://acme-staging-v02.api.letsencrypt.org/directory"
acme_version: 2 acme_version: 2
nextcloud_tarbz2: "https://download.nextcloud.com/server/releases/nextcloud-18.0.0.tar.bz2" nextcloud_tarbz2: "https://download.nextcloud.com/server/releases/nextcloud-18.0.0.tar.bz2"
nextcloud_url: "nc.assburgers.club" nextcloud_url: "nc.assburgers.club"
nextcloud_webroot: "/var/www/nextcloud" nextcloud_webroot: "/var/www/nextcloud"
roles: roles:
- mysql
- nextcloud - nextcloud
- hosts: tag_role_cockpit - hosts: tag_role_cockpit
roles: roles:

View File

@ -15,4 +15,18 @@
name: mysql name: mysql
state: started state: started
enabled: true enabled: true
- name: Update root password
mysql_user:
name: root
host: "{{ item }}"
password: "{{ mysql_root_password }}"
login_user: root
login_password: "{{ mysql_root_password }}"
check_implicit_admin: yes
priv: "*.*:ALL,GRANT"
loop:
- "{{ ansible_hostname }}"
- 127.0.0.1
- ::1
- localhost
become: true become: true