This commit is contained in:
2026-02-03 12:32:43 +01:00
parent d629982afb
commit c942425424

View File

@@ -33,9 +33,9 @@
# shell: "{{ fish_shell_path }}"
# 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:
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
debug: