Merge "Use database_user_create in the register operation"
This commit is contained in:
commit
dfcfd0e5fe
@ -24,9 +24,9 @@
|
|||||||
host='%'
|
host='%'
|
||||||
priv='{{ service_database_name }}.*:ALL'
|
priv='{{ service_database_name }}.*:ALL'
|
||||||
append_privs='yes'"
|
append_privs='yes'"
|
||||||
register: database_user
|
register: database_user_create
|
||||||
changed_when: "{{ database.stdout.find('localhost | SUCCESS => ') != -1 and (database_user.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed }}"
|
changed_when: "{{ database.stdout.find('localhost | SUCCESS => ') != -1 and (database_user_create.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed }}"
|
||||||
failed_when: database_user.stdout.split()[2] != 'SUCCESS'
|
failed_when: database_user_create.stdout.split()[2] != 'SUCCESS'
|
||||||
run_once: True
|
run_once: True
|
||||||
|
|
||||||
- include: start.yml
|
- include: start.yml
|
||||||
|
@ -22,9 +22,9 @@
|
|||||||
host='%'
|
host='%'
|
||||||
priv='{{ cinder_database_name }}.*:ALL'
|
priv='{{ cinder_database_name }}.*:ALL'
|
||||||
append_privs='yes'"
|
append_privs='yes'"
|
||||||
register: database_user
|
register: database_user_create
|
||||||
changed_when: "{{ database.stdout.find('localhost | SUCCESS => ') != -1 and (database_user.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed }}"
|
changed_when: "{{ database.stdout.find('localhost | SUCCESS => ') != -1 and (database_user_create.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed }}"
|
||||||
failed_when: database_user.stdout.split()[2] != 'SUCCESS'
|
failed_when: database_user_create.stdout.split()[2] != 'SUCCESS'
|
||||||
run_once: True
|
run_once: True
|
||||||
|
|
||||||
- name: Starting Cinder data container
|
- name: Starting Cinder data container
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
-m mysql_db
|
-m mysql_db
|
||||||
-a "login_host='{{ database_address }}'
|
-a "login_host='{{ database_address }}'
|
||||||
login_user='{{ database_user }}'
|
login_user='{{ database_user }}'
|
||||||
|
login_port='{{ mariadb_port }}'
|
||||||
login_password='{{ database_password }}'
|
login_password='{{ database_password }}'
|
||||||
name='{{ glance_database_name }}'"
|
name='{{ glance_database_name }}'"
|
||||||
register: database
|
register: database
|
||||||
@ -22,9 +23,9 @@
|
|||||||
host='%'
|
host='%'
|
||||||
priv='{{ glance_database_name }}.*:ALL'
|
priv='{{ glance_database_name }}.*:ALL'
|
||||||
append_privs='yes'"
|
append_privs='yes'"
|
||||||
register: database_user
|
register: database_user_create
|
||||||
changed_when: "{{ database.stdout.find('localhost | SUCCESS => ') != -1 and (database_user.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed }}"
|
changed_when: "{{ database.stdout.find('localhost | SUCCESS => ') != -1 and (database_user_create.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed }}"
|
||||||
failed_when: database_user.stdout.split()[2] != 'SUCCESS'
|
failed_when: database_user_create.stdout.split()[2] != 'SUCCESS'
|
||||||
run_once: True
|
run_once: True
|
||||||
|
|
||||||
- name: Starting Glance data container
|
- name: Starting Glance data container
|
||||||
|
@ -24,9 +24,9 @@
|
|||||||
host='%'
|
host='%'
|
||||||
priv='{{ keystone_database_name }}.*:ALL'
|
priv='{{ keystone_database_name }}.*:ALL'
|
||||||
append_privs='yes'"
|
append_privs='yes'"
|
||||||
register: database_user
|
register: database_user_create
|
||||||
changed_when: "{{ database.stdout.find('localhost | SUCCESS => ') != -1 and (database_user.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed }}"
|
changed_when: "{{ database.stdout.find('localhost | SUCCESS => ') != -1 and (database_user_create.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed }}"
|
||||||
failed_when: database_user.stdout.split()[2] != 'SUCCESS'
|
failed_when: database_user_create.stdout.split()[2] != 'SUCCESS'
|
||||||
run_once: True
|
run_once: True
|
||||||
|
|
||||||
- name: Starting Keystone bootstrap container
|
- name: Starting Keystone bootstrap container
|
||||||
|
@ -22,9 +22,9 @@
|
|||||||
host='%'
|
host='%'
|
||||||
priv='{{ neutron_database_name }}.*:ALL'
|
priv='{{ neutron_database_name }}.*:ALL'
|
||||||
append_privs='yes'"
|
append_privs='yes'"
|
||||||
register: database_user
|
register: database_user_create
|
||||||
changed_when: "{{ database.stdout.find('localhost | SUCCESS => ') != -1 and (database_user.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed }}"
|
changed_when: "{{ database.stdout.find('localhost | SUCCESS => ') != -1 and (database_user_create.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed }}"
|
||||||
failed_when: database_user.stdout.split()[2] != 'SUCCESS'
|
failed_when: database_user_create.stdout.split()[2] != 'SUCCESS'
|
||||||
run_once: True
|
run_once: True
|
||||||
|
|
||||||
- name: Starting Neutron bootstrap container
|
- name: Starting Neutron bootstrap container
|
||||||
|
@ -22,9 +22,9 @@
|
|||||||
host='%'
|
host='%'
|
||||||
priv='{{ nova_database_name }}.*:ALL'
|
priv='{{ nova_database_name }}.*:ALL'
|
||||||
append_privs='yes'"
|
append_privs='yes'"
|
||||||
register: database_user
|
register: database_user_create
|
||||||
changed_when: "{{ database.stdout.find('localhost | SUCCESS => ') != -1 and (database_user.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed }}"
|
changed_when: "{{ database.stdout.find('localhost | SUCCESS => ') != -1 and (database_user_create.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed }}"
|
||||||
failed_when: database_user.stdout.split()[2] != 'SUCCESS'
|
failed_when: database_user_create.stdout.split()[2] != 'SUCCESS'
|
||||||
run_once: True
|
run_once: True
|
||||||
|
|
||||||
- name: Starting Nova bootstrap container
|
- name: Starting Nova bootstrap container
|
||||||
|
Loading…
x
Reference in New Issue
Block a user