From ed86c2bc496516b50bc09ac35bc731c94ad143c1 Mon Sep 17 00:00:00 2001 From: caoyuan Date: Thu, 20 Oct 2016 00:01:25 +0800 Subject: [PATCH] Update 'addUser' to 'createUser' The 'addUser' shell helper is DEPRECATED. Use 'createUser' instead. TrivialFix Change-Id: Ib8c7a8971f46328a666cf63f1914fe50c7067064 --- ansible/roles/ceilometer/tasks/bootstrap.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/roles/ceilometer/tasks/bootstrap.yml b/ansible/roles/ceilometer/tasks/bootstrap.yml index a3253f1758..5fefbba262 100644 --- a/ansible/roles/ceilometer/tasks/bootstrap.yml +++ b/ansible/roles/ceilometer/tasks/bootstrap.yml @@ -1,6 +1,6 @@ --- - name: Creating Ceilometer MongoDB database - command: docker exec -t mongodb mongo --host {{ ceilometer_database_mongodb_address }} --eval 'db = db.getSiblingDB("{{ ceilometer_database_name }}"); db.addUser({user':' "{{ ceilometer_database_user }}", pwd':' "{{ ceilometer_database_password}}", roles':' [ "readWrite", "dbAdmin" ]})' + command: docker exec -t mongodb mongo --host {{ ceilometer_database_mongodb_address }} --eval 'db = db.getSiblingDB("{{ ceilometer_database_name }}"); db.createUser({user':' "{{ ceilometer_database_user }}", pwd':' "{{ ceilometer_database_password}}", roles':' [ "readWrite", "dbAdmin" ]})' register: mongodb_ceilometer_database run_once: true failed_when: