diff options
author | Fatih Degirmenci <fatih.degirmenci@ericsson.com> | 2017-03-29 15:11:27 +0200 |
---|---|---|
committer | Trevor Bramwell <tbramwell@linuxfoundation.org> | 2017-08-11 12:56:12 -0700 |
commit | 0467985246ad639ce3438a6d445cb47af8d32175 (patch) | |
tree | 70582f5c243a5e81af637e6c055e840539e638b5 /xci/playbooks/roles/configure-nfs | |
parent | 8536f94d9dd56bbb56906c7c29d3b15f5970e0ae (diff) |
xci: Add ansible files for sandbox noha flavor
This patch adds noha target host configuration playbook, inventory, variable
files and so on to use until we have time to fix things more properly and some
other functionality becomes available in upstream. This approach will result in
duplicates but it is something we can perhaps live with.
NFS configuration is converted into a role and the rest is adjusted accordingly.
The playbook to configure target hosts will be same with the one we will
have for ha flavor but for different for the flavor mini.
The user variables and openstack user configuration will be different between
flavors and keeping deployment specific configuration.
Change-Id: I8faceae846285fc3e4260cbced5b740a9b0c3766
Signed-off-by: Fatih Degirmenci <fatih.degirmenci@ericsson.com>
Diffstat (limited to 'xci/playbooks/roles/configure-nfs')
-rw-r--r-- | xci/playbooks/roles/configure-nfs/tasks/main.yml | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/xci/playbooks/roles/configure-nfs/tasks/main.yml b/xci/playbooks/roles/configure-nfs/tasks/main.yml new file mode 100644 index 00000000..b188f4db --- /dev/null +++ b/xci/playbooks/roles/configure-nfs/tasks/main.yml @@ -0,0 +1,36 @@ +--- +# SPDX-license-identifier: Apache-2.0 +############################################################################## +# Copyright (c) 2017 Ericsson AB and others. +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## +# TODO: this is for xenial and needs to be adjusted for different distros +- block: + - name: make NFS dir + file: + dest: /images + mode: 777 + state: directory + - name: configure NFS service + lineinfile: + dest: /etc/services + state: present + create: yes + line: "{{ item }}" + with_items: + - "nfs 2049/tcp" + - "nfs 2049/udp" + - name: configure NFS exports on ubuntu xenial + copy: + src: ../file/exports + dest: /etc/exports + when: ansible_distribution_release == "xenial" + # TODO: the service name might be different on other distros and needs to be adjusted + - name: restart ubuntu xenial NFS service + service: + name: nfs-kernel-server + state: restarted + when: ansible_distribution_release == "xenial" |