4
0
Fork 0

removed split filter allowing old ansible versions

Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com>
This commit is contained in:
Mark Bolwell 2023-01-27 11:03:23 +00:00
parent 98feeb1b01
commit a759c38902
No known key found for this signature in database
GPG key ID: 1DE02A772D0908F9
2 changed files with 7 additions and 2 deletions

View file

@ -119,7 +119,7 @@
ansible.builtin.user:
name: "{{ item }}"
groups: "{{ rhel9cis_sugroup | default('wheel') }}"
loop: "{{ rhel9cis_sugroup_users | split (',') }}"
loop: "{{ rhel9cis_sugroup_users }}"
when:
- rhel9cis_rule_5_3_7
tags:

View file

@ -194,6 +194,11 @@
changed_when: false
register: rhel9cis_6_2_8_root_paths
- name: "6.2.8 | AUDIT | Ensure root PATH Integrity | Get root paths"
ansible.builtin.shell: sudo -Hiu root env | grep '^PATH' | cut -d= -f2 | tr ":" "\n"
changed_when: false
register: rhel9cis_6_2_8_root_paths_split
- name: "6.2.8 | AUDIT | Ensure root PATH Integrity | Set fact"
ansible.builtin.set_fact:
root_paths: "{{ rhel9cis_6_2_8_root_paths.stdout }}"
@ -216,7 +221,7 @@
ansible.builtin.stat:
path: "{{ item }}"
register: root_path_perms
loop: "{{ rhel9cis_6_2_8_root_paths.stdout | split(':') }}"
loop: "{{ rhel9cis_6_2_8_root_paths_split.stdout_lines }}"
- ansible.builtin.debug:
msg: "{{ root_path_perms.results }}"