summaryrefslogtreecommitdiffstats
path: root/prototypes/xci/playbooks/roles
diff options
context:
space:
mode:
authorFatih Degirmenci <fatih.degirmenci@ericsson.com>2017-04-18 10:53:21 +0200
committerFatih Degirmenci <fatih.degirmenci@ericsson.com>2017-04-18 09:34:01 +0000
commit8f9a53258a858b78229974cf09a3da67608ef0bd (patch)
treed98915c5c34e7c2b34cbb4da595bf661b34bf138 /prototypes/xci/playbooks/roles
parent86f730857639949a2bb5135ae6366d00da424002 (diff)
xci: Change cinder backend and move nfs to compute00
This change - switches cinder backend from lvm to nfs as examplified in [1]. - moves nfs shares from compute01 to compute00 in order to merge configure-targethosts.yml playbook in upcoming change. - updates openstack_user_config.yml to reflect the switch to nfs and move of nfs server to compute00. - removes exports file due to switching to lineinfile module. [1] https://docs.openstack.org/project-deploy-guide/openstack-ansible/draft/app-config-prod.html Change-Id: I0715c98a89ab124256e3857c1047e374f261e39b Signed-off-by: Fatih Degirmenci <fatih.degirmenci@ericsson.com>
Diffstat (limited to 'prototypes/xci/playbooks/roles')
-rw-r--r--prototypes/xci/playbooks/roles/configure-nfs/tasks/main.yml19
1 files changed, 13 insertions, 6 deletions
diff --git a/prototypes/xci/playbooks/roles/configure-nfs/tasks/main.yml b/prototypes/xci/playbooks/roles/configure-nfs/tasks/main.yml
index 66dd0afa3..c52da0bf3 100644
--- a/prototypes/xci/playbooks/roles/configure-nfs/tasks/main.yml
+++ b/prototypes/xci/playbooks/roles/configure-nfs/tasks/main.yml
@@ -9,11 +9,14 @@
##############################################################################
# TODO: this is for xenial and needs to be adjusted for different distros
- block:
- - name: make NFS dir
+ - name: make NFS directories
file:
- dest: /images
+ dest: "{{ item }}"
mode: 0777
state: directory
+ with_items:
+ - "/images"
+ - "/volumes"
- name: configure NFS service
lineinfile:
dest: /etc/services
@@ -23,11 +26,15 @@
with_items:
- "nfs 2049/tcp"
- "nfs 2049/udp"
- - name: configure NFS exports on ubuntu xenial
- copy:
- src: ../file/exports
+ - name: configure NFS exports
+ lineinfile:
dest: /etc/exports
- when: ansible_distribution_release == "xenial"
+ state: present
+ create: yes
+ line: "{{ item }}"
+ with_items:
+ - "/images *(rw,sync,no_subtree_check,no_root_squash)"
+ - "/volumes *(rw,sync,no_subtree_check,no_root_squash)"
# TODO: the service name might be different on other distros and needs to be adjusted
- name: restart ubuntu xenial NFS service
service: