mirror of
https://github.com/ansible-lockdown/RHEL9-CIS.git
synced 2025-12-24 22:23:06 +00:00
with_items to loop
Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com>
This commit is contained in:
parent
674e0fab16
commit
7760f35161
4 changed files with 5 additions and 8 deletions
|
|
@ -62,8 +62,7 @@
|
|||
mode: "0600"
|
||||
owner: root
|
||||
group: root
|
||||
with_items:
|
||||
- tipc
|
||||
loop: tipc # note the item used in the template
|
||||
|
||||
- name: "3.1.3 | PATCH | Ensure TIPC is disabled | blacklist"
|
||||
ansible.builtin.lineinfile:
|
||||
|
|
|
|||
|
|
@ -21,8 +21,7 @@
|
|||
ansible.builtin.systemd:
|
||||
name: "{{ item }}"
|
||||
masked: true
|
||||
with_items:
|
||||
- firewalld
|
||||
loop: firewalld
|
||||
when:
|
||||
- item in ansible_facts.packages
|
||||
- rhel9cis_firewall == 'nftables'
|
||||
|
|
@ -31,8 +30,7 @@
|
|||
ansible.builtin.systemd:
|
||||
name: "{{ item }}"
|
||||
masked: true
|
||||
with_items:
|
||||
- nftables
|
||||
loop: nftables
|
||||
when:
|
||||
- item in ansible_facts.packages
|
||||
- rhel9cis_firewall == 'firewalld'
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@
|
|||
- name: "3.4.2.3 | PATCH | Ensure nftables base chains exist | Create chains if needed"
|
||||
ansible.builtin.shell: "{{ item }}"
|
||||
failed_when: false
|
||||
with_items:
|
||||
loop:
|
||||
- nft create chain inet "{{ rhel9cis_nft_tables_tablename }}" input { type filter hook input priority 0 \; }
|
||||
- nft create chain inet "{{ rhel9cis_nft_tables_tablename }}" forward { type filter hook forward priority 0 \; }
|
||||
- nft create chain inet "{{ rhel9cis_nft_tables_tablename }}" output { type filter hook output priority 0 \; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue