Je kunt niet meer dan 25 onderwerpen selecteren Onderwerpen moeten beginnen met een letter of nummer, kunnen streepjes bevatten ('-') en kunnen maximaal 35 tekens lang zijn.
 
 
 
 
 
 

33 regels
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 }}"