try
This commit is contained in:
@@ -33,9 +33,9 @@
|
|||||||
# shell: "{{ fish_shell_path }}"
|
# shell: "{{ fish_shell_path }}"
|
||||||
# loop: "{{ users_with_bash_zsh.stdout_lines }}"
|
# loop: "{{ users_with_bash_zsh.stdout_lines }}"
|
||||||
|
|
||||||
- name: Create a list of users with bash or zsh shell
|
- name: Create a list of users with bash, zsh or fish shell
|
||||||
set_fact:
|
set_fact:
|
||||||
my_users: "{{ ansible_facts.getent_passwd | dict2items | selectattr('value.5', 'in', ['/bin/bash', '/usr/bin/bash', '/bin/zsh', '/usr/bin/zsh']) | map(attribute='key') | list }}"
|
my_users: "{{ ansible_facts.getent_passwd | dict2items | selectattr('value.5', 'in', ['/bin/bash', '/usr/bin/bash', '/bin/zsh', '/usr/bin/zsh', '/bin/fish', '/usr/bin/fish']) | map(attribute='key') | list }}"
|
||||||
|
|
||||||
- name: Debug my_users
|
- name: Debug my_users
|
||||||
debug:
|
debug:
|
||||||
|
|||||||
Reference in New Issue
Block a user