From 8af275942f8a294ab601629549a9bef2e63fc98f Mon Sep 17 00:00:00 2001 From: layluke Date: Sat, 28 Sep 2024 14:58:40 -0400 Subject: [PATCH] Added selectattr value to select only nfs mounts Signed-off-by: layluke --- tasks/Cat2/RHEL-09-23xxxx.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tasks/Cat2/RHEL-09-23xxxx.yml b/tasks/Cat2/RHEL-09-23xxxx.yml index a6e4e65..3e1b1b0 100644 --- a/tasks/Cat2/RHEL-09-23xxxx.yml +++ b/tasks/Cat2/RHEL-09-23xxxx.yml @@ -215,7 +215,7 @@ path: "{{ item.mount }}" src: "{{ item.device }}" state: present - loop: "{{ ansible_facts.mounts }}" + loop: "{{ ansible_facts.mounts | selectattr('fstype', 'equalto', 'nfs') | list }}" loop_control: label: "{{ item.device }}" @@ -240,7 +240,7 @@ path: "{{ item.mount }}" src: "{{ item.device }}" state: present - loop: "{{ ansible_facts.mounts }}" + loop: "{{ ansible_facts.mounts | selectattr('fstype', 'equalto', 'nfs') | list }}" loop_control: label: "{{ item.device }}" @@ -265,7 +265,7 @@ path: "{{ item.mount }}" src: "{{ item.device }}" state: present - loop: "{{ ansible_facts.mounts }}" + loop: "{{ ansible_facts.mounts | selectattr('fstype', 'equalto', 'nfs') | list }}" loop_control: label: "{{ item.device }}"