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 &&
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:
>
> -
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" &&
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 } '
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" &&