Updates for reboot_test3.yml

This commit is contained in:
2025-07-28 16:39:29 -04:00
parent 2530c8c196
commit e849d2257d
2 changed files with 9 additions and 8 deletions

3
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,3 @@
{
"ansible.python.interpreterPath": "/usr/bin/python"
}

View File

@ -17,11 +17,13 @@
gather_facts: false
vars:
__nfs_share: /nfs/backups
__nfs_src: 10.10.42.155
__nfs_share: /exports/shared
__nfs_mnt_pnt: /nfs/cluster
tasks:
- name: Lazily unmount the NFS share
ansible.builtin.command: "umount -f -l {{ __nfs_share }}"
ansible.builtin.command: "umount -f -l {{ __nfs_mnt_pnt }}"
- name: Reboot host if file changes # noqa: no-handler
ansible.builtin.import_role:
@ -30,12 +32,8 @@
- name: Unlazily re-mount the file system
ansible.posix.mount:
state: mounted
src: 10.10.42.180:/backups
path: /nfs/backups
src: "{{ __nfs_src }}:{{ __nfs_share }}"
path: "{{ __nfs_mnt_pnt }}"
opts: rw,noatime
boot: false
fstype: nfs
# write script to write files until reboot happens
# script should write number, sleep 1 second, write number, etc