summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSeth Vidal <skvidal@fedoraproject.org>2012-10-10 20:01:39 +0000
committerSeth Vidal <skvidal@fedoraproject.org>2012-10-10 20:01:39 +0000
commit7aa6365096747e7ec933b78b1fc7338f704bb6a1 (patch)
tree394b42ce6c0de11cc7c12fbc38fc7b22f87823b9
parent94834462a3e668e9834f19cd71358086c881e128 (diff)
downloadansible-7aa6365096747e7ec933b78b1fc7338f704bb6a1.tar.gz
ansible-7aa6365096747e7ec933b78b1fc7338f704bb6a1.tar.xz
ansible-7aa6365096747e7ec933b78b1fc7338f704bb6a1.zip
add a mongo-acct script template - to be populated with passwords, etc later
-rw-r--r--files/openshift/mongo-acct.sh7
-rw-r--r--tasks/openshift-el6.yml18
2 files changed, 23 insertions, 2 deletions
diff --git a/files/openshift/mongo-acct.sh b/files/openshift/mongo-acct.sh
new file mode 100644
index 000000000..15e8973e0
--- /dev/null
+++ b/files/openshift/mongo-acct.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+mongo stickshift_broker_dev --eval 'db.addUser("stickshift", "mooo")'
+mongo stickshift_broker_dev --eval 'db.auth_user.update({"_id":"admin"}, {"_id":"admin","user":"admin","password":"2a8462d93a13e51387a5e607cbd1139f"} , true)'
+echo "Acct setup done on `date`" > /etc/mongo-acct-setup
+
+
+ \ No newline at end of file
diff --git a/tasks/openshift-el6.yml b/tasks/openshift-el6.yml
index 875b5eb85..ceb5997e1 100644
--- a/tasks/openshift-el6.yml
+++ b/tasks/openshift-el6.yml
@@ -56,12 +56,26 @@
action: copy src=$files/openshift/mongodb.conf dest=/etc/mongodb.conf backup=true
tags:
- mongo
+
- name: mongod service start
action: service name=mongod state=running enabled=yes
tags:
- mongo
-- name: setup openshift mongo pw
- action: command mongo stickshift_broker_dev --eval \'db.addUser("stickshift", "mooo")\'
+
+- name: mongo/openshift account setup script
+ action: template src=$files/openshift/mongo-acct.sh dest=/root/mongo-acct.sh mode=0700
+ tags:
+ - mongo
+
+- name: mongo/openshift account setup
+ action: command /root/mongo-acct.sh
+ creates: /etc/mongo-acct-setup
tags:
- mongo
+- name: clear file mongo acct file
+ action: file state=absent /root/mongo-acct.sh
+ tags:
+ - mongo
+
+