Skip to content
Snippets Groups Projects
Commit b5576ed8 authored by Jupiter Hu's avatar Jupiter Hu
Browse files

Fixed fake nvsServer

parent eca2013a
No related branches found
No related tags found
No related merge requests found
---
- name: Pre installation
shell: "{{ preInstallation }}"
sudo: true
when: ansible_distribution == 'CentOS' and preInstallation is defined
- name: Add new repo file
shell: "{{ importRepo.command }}" "{{ importRepo.destination }}""
sudo: true
run_once: true
args:
creates: "{{ importRepo.destination }}"
when: ansible_distribution == 'CentOS' and importRepo is defined
- name: Install yum packages
yum: name={{ item }} state=latest
with_items: yumPackageList
sudo: true
when: ansible_distribution == 'CentOS' and yumPackageList is defined
- name: Install yum group packages
shell: yum --setopt=protected_multilib=false -y groupinstall "{{ item }}"
with_items: yumGroupPackageList
sudo: true
when: ansible_distribution == 'CentOS' and yumGroupPackageList is defined
- name: Post installation
shell: "{{ postInstallation }}"
sudo: true
when: ansible_distribution == 'CentOS' and postInstallation is defined
......@@ -4,7 +4,7 @@
register: nfsServer
run_once: true
delegate_to: "{{ nfs_server }}"
when: nfsServer is not defined
when: naNfsServer is not defined
- name: "Mounting NFS mounts"
mount: "name={{ item.name }} src={{ nfsServer['ansible_facts']['ansible_'+item.interface]['ipv4']['address'] }}:{{ item.src }} fstype={{ item.fstype }} opts={{ item.opts }} state=mounted"
......@@ -12,3 +12,13 @@
notify: "restart authentication"
notify: "restart idmap"
sudo: true
when: naNfsServer is not defined
- name: "Mounting non-ansible NFS server"
mount: "name={{ item.name }} src={{ naNfsServer['ansible_facts']['ansible_'+item.interface]['ipv4']['address'] }}:{{ item.src }} fstype={{ item.fstype }} opts={{ item.opts }} state=mounted"
with_items: exportList
notify: "restart authentication"
notify: "restart idmap"
sudo: true
when: naNfsServer is defined
---
- name: Reload exports
- name: "Reload exports"
command: exportfs -ra
delegate_to: "{{ nfs_server }}"
run_once: true
sudo: true
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment