Update mongodb bootstrap tasks
When deploying on hosts with PyMongo version > 3.0, as found on Xenial hosts, The bootstrap playbook will fail due to the following error: 'The localhost login exception only allows the first admin account to be created' To resolve this error a "root" user create and password setup has been added to the tasks and the required login credentials have been passed to the ceilometer and aodh tasks. Change-Id: Iaa29b4256dd4b3ac0774a05fc55f5b845ee57732 Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
This commit is contained in:
parent
63012f0c40
commit
63b4989c33
@ -90,6 +90,9 @@ bootstrap_host_mongodb_users: "{{ bootstrap_host_mongodb_service }}"
|
||||
#
|
||||
# Specify the IP address of a MongoDB Host.
|
||||
bootstrap_host_mongodb_address: 172.29.236.100
|
||||
#
|
||||
# Specify the password to be used with the first mongo admin user
|
||||
bootstrap_host_mongodb_password: SuperSecrete
|
||||
|
||||
### Optional Settings ###
|
||||
|
||||
|
@ -18,9 +18,22 @@
|
||||
tags:
|
||||
- mongodb-secrets
|
||||
|
||||
- name: Add admin user
|
||||
mongodb_user:
|
||||
login_host: "{{ bootstrap_host_mongodb_address }}"
|
||||
database: admin
|
||||
name: root
|
||||
password: "{{ bootstrap_host_mongodb_password }}"
|
||||
roles: 'root'
|
||||
state: present
|
||||
tags:
|
||||
- mongodb-create-user-admin
|
||||
|
||||
- name: Add ceilometer database user
|
||||
mongodb_user:
|
||||
login_host: "{{ bootstrap_host_mongodb_address }}"
|
||||
login_user: "root"
|
||||
login_password: "{{ bootstrap_host_mongodb_password }}"
|
||||
database: ceilometer
|
||||
name: ceilometer
|
||||
password: "{{ ceilometer_container_db_password }}"
|
||||
@ -32,6 +45,8 @@
|
||||
- name: Add aodh database user
|
||||
mongodb_user:
|
||||
login_host: "{{ bootstrap_host_mongodb_address }}"
|
||||
login_user: "root"
|
||||
login_password: "{{ bootstrap_host_mongodb_password }}"
|
||||
database: aodh
|
||||
name: aodh
|
||||
password: "{{ aodh_container_db_password }}"
|
||||
|
Loading…
Reference in New Issue
Block a user