소스 검색

fix mariadb users

master
Markus Bergholz 11 달 전
부모
커밋
d981912008
1개의 변경된 파일12개의 추가작업 그리고 10개의 파일을 삭제
  1. +12
    -10
      ansible/mariadb_users.yml

+ 12
- 10
ansible/mariadb_users.yml 파일 보기

@@ -3,30 +3,32 @@
vars:
NC_TOKEN: "{{ lookup('env', 'NC_TOKEN') }}"
MARIADB_PASSWORD: "{{ lookup('nc_password', 'root_mariadb_password' , host='home.osuv.de', user='m', token=NC_TOKEN) }}"
list:
dbs:
- nextcloud
- gitea
- grafana

tasks:
- name: "add or update user"
mysql_user:
- name: "databases must be present"
mysql_db:
login_host: 127.0.0.1
login_password: "{{ MARIADB_PASSWORD }}"
login_port: 3307
login_user: m
name: "{{ item }}"
password: "{{ lookup('nc_password', item + '_mariadb_password' , host='home.osuv.de', user='m', token=NC_TOKEN) }}"
priv: "{{ item }}.*:ALL"
state: present
with_items: "{{ list }}"
encoding: utf8mb4
with_items: "{{ dbs }}"

- name: "databases must be present"
mysql_db:
- name: "add or update user"
mysql_user:
login_host: 127.0.0.1
login_password: "{{ MARIADB_PASSWORD }}"
login_port: 3307
login_port: 3306
login_user: m
name: "{{ item }}"
host: "%"
password: "{{ lookup('nc_password', item + '_mariadb_password' , host='home.osuv.de', user='m', token=NC_TOKEN) }}"
priv: "{{ item }}.*:ALL"
state: present
encoding: utf8mb4
with_items: "{{ list }}"

불러오는 중...
취소
저장