Add checks for defined return codes in samba user management tasks
This commit is contained in:
@@ -30,6 +30,7 @@
|
|||||||
loop_control:
|
loop_control:
|
||||||
label: '{{ item.item.name }}'
|
label: '{{ item.item.name }}'
|
||||||
when:
|
when:
|
||||||
|
- item.rc is defined
|
||||||
- item.rc == 0
|
- item.rc == 0
|
||||||
tags:
|
tags:
|
||||||
- samba-user
|
- samba-user
|
||||||
@@ -60,6 +61,7 @@
|
|||||||
loop_control:
|
loop_control:
|
||||||
label: '{{ item.item.name }}'
|
label: '{{ item.item.name }}'
|
||||||
when:
|
when:
|
||||||
|
- item.rc is defined
|
||||||
- item.rc == 0
|
- item.rc == 0
|
||||||
tags:
|
tags:
|
||||||
- samba-user
|
- samba-user
|
||||||
|
|||||||
@@ -30,7 +30,9 @@
|
|||||||
executable: /bin/bash
|
executable: /bin/bash
|
||||||
changed_when: true
|
changed_when: true
|
||||||
loop: "{{ common_samba_nis_user_present.results }}"
|
loop: "{{ common_samba_nis_user_present.results }}"
|
||||||
when: item.rc == 1
|
when:
|
||||||
|
- item.rc is defined
|
||||||
|
- item.rc == 1
|
||||||
loop_control:
|
loop_control:
|
||||||
label: '{{ item.item.name }}'
|
label: '{{ item.item.name }}'
|
||||||
tags:
|
tags:
|
||||||
|
|||||||
Reference in New Issue
Block a user