Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 
 
 
 
 

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