summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRalph Bean <rbean@redhat.com>2017-09-18 17:48:37 +0000
committerRalph Bean <rbean@redhat.com>2017-09-18 17:48:37 +0000
commit067312574089727b6ee0daf986b88eb87a6e60be (patch)
treed8b6d8e11dffce04ec10036f169cac900f0e3741
parent151ca76db877e184315b453f2a27369f739b4b10 (diff)
downloadansible-067312574089727b6ee0daf986b88eb87a6e60be.tar.gz
ansible-067312574089727b6ee0daf986b88eb87a6e60be.tar.xz
ansible-067312574089727b6ee0daf986b88eb87a6e60be.zip
Try setting up a gluster share for odcs.
-rw-r--r--inventory/group_vars/odcs1
-rw-r--r--inventory/group_vars/odcs-stg1
-rw-r--r--playbooks/groups/odcs.yml39
3 files changed, 41 insertions, 0 deletions
diff --git a/inventory/group_vars/odcs b/inventory/group_vars/odcs
new file mode 100644
index 000000000..bfdfe100c
--- /dev/null
+++ b/inventory/group_vars/odcs
@@ -0,0 +1 @@
+odcs_gluster_server: odcs-backend01.phx2.fedoraproject.org
diff --git a/inventory/group_vars/odcs-stg b/inventory/group_vars/odcs-stg
new file mode 100644
index 000000000..ec386d14b
--- /dev/null
+++ b/inventory/group_vars/odcs-stg
@@ -0,0 +1 @@
+odcs_gluster_server: odcs-backend01.stg.phx2.fedoraproject.org
diff --git a/playbooks/groups/odcs.yml b/playbooks/groups/odcs.yml
index cded19a84..0290a9d45 100644
--- a/playbooks/groups/odcs.yml
+++ b/playbooks/groups/odcs.yml
@@ -77,3 +77,42 @@
handlers:
- include: "{{ handlers_path }}/restart_services.yml"
+
+- name: Set up a gluster share on the backend for the frontend
+ hosts: odcs-backend:odcs-backend-stg
+ user: root
+ gather_facts: True
+
+ vars_files:
+ - /srv/web/infra/ansible/vars/global.yml
+ - "/srv/private/ansible/vars.yml"
+ - "{{ vars_path }}/{{ ansible_distribution }}.yml"
+ roles:
+ - role: gluster/server
+ name: gluster
+ username: "{{ odcs_gluster_username }}"
+ password: "{{ odcs_gluster_password }}"
+ owner: root
+ group: root
+ datadir: /srv/glusterfs/odcs-stg
+
+- name: Configure all odcs nodes to mount the gluster share.
+ hosts: odcs:odcs-stg
+ user: root
+ gather_facts: True
+
+ vars_files:
+ - /srv/web/infra/ansible/vars/global.yml
+ - "/srv/private/ansible/vars.yml"
+ - "{{ vars_path }}/{{ ansible_distribution }}.yml"
+
+ roles:
+ - role: gluster/client
+ name: gluster
+ servers:
+ - {{odcs_gluster_server}}
+ username: "{{ odcs_gluster_username }}"
+ password: "{{ odcs_gluster_password }}"
+ owner: root
+ group: root
+ mountdir: /srv/odcs