Add var to control MongoDB user creation

Add the var bootstrap_host_mongodb_users to allow the MongoDB user
creation tasks in the bootstrap-host role to be skipped using the
BOOTSTRAP_OPTS environment variable defined in the script
bootstrap-aio.sh.

The default value for bootstrap_host_mongodb_users is the value of
bootstrap_host_mongodb_service.

Without this change setting bootstrap_host_mongodb_service=no causes the
bootstrap-host role to fail on the task 'Add ceilometer database user'.

Change-Id: Iab30ed29f1bc1a922e5adf89b1057c598ec067e3
This commit is contained in:
git-harry 2016-03-30 13:47:16 +01:00
parent 99dc279efb
commit 318109d0ed
2 changed files with 4 additions and 0 deletions

View File

@ -88,6 +88,9 @@ bootstrap_host_data_disk_min_size: 60
# Boolean value to deploy and configure the MongoDB service on the host.
bootstrap_host_mongodb_service: yes
#
# Boolean value to configure the required MongoDB users
bootstrap_host_mongodb_users: "{{ bootstrap_host_mongodb_service }}"
#
# Specify the IP address of a MongoDB Host.
bootstrap_host_mongodb_address: 172.29.236.100

View File

@ -106,6 +106,7 @@
# Prepare the MongoDB Users for Ceilometer/Aodh
- include: prepare_mongodb_users.yml
when: bootstrap_host_mongodb_users | bool
tags:
- prepare-mongodb-users