63b4989c33
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>
57 lines
1.7 KiB
YAML
57 lines
1.7 KiB
YAML
---
|
|
# Copyright 2015, Rackspace US, Inc.
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
|
|
- name: Read user_secrets vars
|
|
include_vars: /etc/openstack_deploy/user_secrets.yml
|
|
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 }}"
|
|
roles: 'readWrite,dbAdmin'
|
|
state: present
|
|
tags:
|
|
- mongodb-create-user-ceilometer
|
|
|
|
- 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 }}"
|
|
roles: 'readWrite,dbAdmin'
|
|
state: present
|
|
tags:
|
|
- mongodb-create-user-aodh
|