Re: [ansible-project] Issue with a shell command

2023-03-21 Thread Dick Visser
with_items is incorrectly indented On Tue, 21 Mar 2023 at 16:14, lift...@gmail.com wrote: > I was able to get past that issue, but now the next play is erroring out: > > - name: Disable System Accounts - preparation > ansible.builtin.shell: | > set -o pipefail && awk -F':' '($3<500 &&

Re: [ansible-project] Issue with a shell command

2023-03-21 Thread Alex Wanderley
Hello, If you debug/print the whole content of "enabled_system_accounts" what do you see? Is "enabled_system_accounts.stdout_lines" being populated? Alex On Tue, Mar 21, 2023 at 9:14 AM lift...@gmail.com wrote: > I was able to get past that issue, but now the next play is erroring out: > > -

Re: [ansible-project] Issue with a shell command

2023-03-21 Thread lift...@gmail.com
I was able to get past that issue, but now the next play is erroring out: - name: Disable System Accounts - preparation ansible.builtin.shell: | set -o pipefail && awk -F':' '($3<500 && $1!="root" && $1!="sync" && $1!="shutdown" && $1!="sync" && $1!="shutdown" && $1!="halt" &&

Re: [ansible-project] Issue with a shell command

2023-03-21 Thread Will McDonald
I suspect your problem is simply that your shell command's incorrectly quoted and something like: ansible.builtin.shell: | set -o pipefail && awk -F':' '($3<500 && $1!="root" && $1!="sync" && $1!="shutdown" && $1!="sync" && $1!="shutdown" && $1!="halt" && $7!="/sbin/nologin") { print $1 } '

[ansible-project] Issue with a shell command

2023-03-21 Thread lift...@gmail.com
We have a role that implements the CIS benchmarks on our systems. When we get to the following play, we get the error described below: - name: Disable System Accounts - preparation ansible.builtin.shell: | set -o pipefail && awk -F':' \| ($3<500 && $1!="root" && $1!="sync" &&