From 8f9a53258a858b78229974cf09a3da67608ef0bd Mon Sep 17 00:00:00 2001 From: Fatih Degirmenci Date: Tue, 18 Apr 2017 10:53:21 +0200 Subject: 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 --- .../xci/playbooks/roles/configure-nfs/tasks/main.yml | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'prototypes/xci/playbooks/roles') 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: -- cgit 1.2.3-korg