Merge "Add _oslodb_login_host to db_setup tasks."

This commit is contained in:
Zuul 2020-09-01 15:13:21 +00:00 committed by Gerrit Code Review
commit 6ad9e8dce1

View File

@ -22,12 +22,16 @@
- name: Setup Database Service (MariaDB) - name: Setup Database Service (MariaDB)
delegate_to: "{{ _oslodb_setup_host }}" delegate_to: "{{ _oslodb_setup_host }}"
vars:
ansible_python_interpreter: "{{ _oslodb_ansible_python_interpreter }}"
tags: tags:
- common-mariadb - common-mariadb
block: block:
- name: Create database for service - name: Create database for service
mysql_db: mysql_db:
name: "{{ item.name }}" name: "{{ item.name }}"
login_host: "{{ _oslodb_setup_endpoint | default(omit) }}"
login_port: "{{ _oslodb_setup_port | default(omit) }}"
loop: "{{ _oslodb_databases }}" loop: "{{ _oslodb_databases }}"
no_log: true no_log: true
@ -38,5 +42,7 @@
host: "{{ item.1.host | default('%') }}" host: "{{ item.1.host | default('%') }}"
priv: "{{ item.0.name }}.*:{{ item.1.priv | default('ALL') }}" priv: "{{ item.0.name }}.*:{{ item.1.priv | default('ALL') }}"
append_privs: yes append_privs: yes
login_host: "{{ _oslodb_setup_endpoint | default(omit) }}"
login_port: "{{ _oslodb_setup_port | default(omit) }}"
loop: "{{ _oslodb_databases | subelements('users') }}" loop: "{{ _oslodb_databases | subelements('users') }}"
no_log: true no_log: true