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.
 
 
 
 
 
 

33 rivejä
883 B

---
- hosts: something
vars:
MARIADB_PASSWORD: "{{ lookup('markuman.nextcloud.passwords', 'root_mariadb_password') }}"
dbs:
- nextcloud
- gitea
- grafana
tasks:
- name: "databases must be present"
mysql_db:
login_host: 127.0.0.1
login_password: "{{ MARIADB_PASSWORD }}"
login_port: 3306
login_user: m
name: "{{ item }}"
state: present
encoding: utf8mb4
with_items: "{{ dbs }}"
- name: "add or update user"
mysql_user:
login_host: 127.0.0.1
login_password: "{{ MARIADB_PASSWORD }}"
login_port: 3306
login_user: m
name: "{{ item }}"
host: "%"
password: "{{ lookup('markuman.nextcloud.passwords', item + '_mariadb_password') }}"
priv: "{{ item }}.*:ALL"
state: present
with_items: "{{ list }}"