Commit fa647094 authored by julian.gethmann's avatar julian.gethmann Committed by root
Browse files

change remount configuration

parent 23c04eda
...@@ -20,14 +20,33 @@ ...@@ -20,14 +20,33 @@
become: yes become: yes
when: ansible_distribution == 'CentOS' when: ansible_distribution == 'CentOS'
- name: mount lasarchiv1 - name: add lasarchiv1 to fstab
mount: mount:
name: "/mnt/las-archiv1" name: "/mnt/las-archiv1"
src: "{{ nfs_server }}:/las-archiv1" src: "{{ nfs_server }}:/las-archiv1"
fstype: nfs4 fstype: nfs4
opts: "soft,timeo=14,intr,nosuid" opts: "soft,timeo=14,intr,nosuid"
state: "{{ item }}" state: "present"
become: yes become: yes
when: (ansible_default_ipv4.address | ipv4('')) or (ansible_default_ipv6.address | ipv6('2a00:1398:4:8200::/64')) when: (ansible_default_ipv4.address | ipv4('')) or (ansible_default_ipv6.address | ipv6('2a00:1398:4:8200::/64'))
with_items: register: fstab
- present
- name: check if mount exist
path: "/mnt/las-archiv1"
register: lasarchiv1
ignore_errors: True
- name: mount lasarchiv1
name: "/mnt/las-archiv1"
src: "{{ nfs_server }}:/las-archiv1"
fstype: nfs4
opts: "soft,timeo=14,intr,nosuid"
state: "present"
become: yes
when: >
((ansible_default_ipv4.address | ipv4('')) or (ansible_default_ipv6.address | ipv6('2a00:1398:4:8200::/64'))) and
((fstab.changed) and (lasarchiv1.stat.isdir is defined and lasarchiv1.stat.isdir) or ("'Input/output error' in lasarchiv1.stderr"))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment