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