Skip to content

Commit

Permalink
Fixing indentation
Browse files Browse the repository at this point in the history
Signed-off-by: Diana-Maria Dumitru <[email protected]>
  • Loading branch information
DianaMariaDDM committed Jan 29, 2024
1 parent 4343e34 commit ae0e66d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
24 changes: 12 additions & 12 deletions tasks/prelim.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,18 +61,18 @@

- name: Initialize the mount options variable
block:
- name: Initializing the var if there is no /tmp mount
ansible.builtin.set_fact:
tmp_partition_mount_options: []
when: "'/tmp' not in mount_names"

- name: Initializing the var if there is a /tmp mount
ansible.builtin.set_fact:
tmp_partition_mount_options: "{{ item.options }}"
loop: "{{ ansible_facts.mounts }}"
when:
- item.mount == "/tmp"
- "'/tmp' in mount_names"
- name: Initializing the var if there is no /tmp mount
ansible.builtin.set_fact:
tmp_partition_mount_options: []
when: "'/tmp' not in mount_names"

- name: Initializing the var if there is a /tmp mount
ansible.builtin.set_fact:
tmp_partition_mount_options: "{{ item.options }}"
loop: "{{ ansible_facts.mounts }}"
when:
- item.mount == "/tmp"
- "'/tmp' in mount_names"
tags:
-always

Expand Down
6 changes: 3 additions & 3 deletions tasks/section_1/cis_1.1.2.x.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

- name: "1.1.2.2 | PATCH | Ensure nodev option set on /tmp partition"
ansible.builtin.set_fact:
tmp_partition_mount_options: "{{ tmp_partition_mount_options + [ 'nodev' ] }}"
tmp_partition_mount_options: "{{ tmp_partition_mount_options + [ 'nodev' ] }}"
notify: Writing and remounting tmp
when: ubtu22cis_rule_1_1_2_2
tags:
Expand All @@ -38,7 +38,7 @@

- name: "1.1.2.3 | PATCH | Ensure noexec option set on /tmp partition"
ansible.builtin.set_fact:
tmp_partition_mount_options: "{{ tmp_partition_mount_options + [ 'noexec' ] }}"
tmp_partition_mount_options: "{{ tmp_partition_mount_options + [ 'noexec' ] }}"
notify: Writing and remounting tmp
when: ubtu22cis_rule_1_1_2_3
tags:
Expand All @@ -51,7 +51,7 @@

- name: "1.1.2.4 | PATCH | Ensure nosuid option set on /tmp partition"
ansible.builtin.set_fact:
tmp_partition_mount_options: "{{ tmp_partition_mount_options + [ 'nosuid' ] }}"
tmp_partition_mount_options: "{{ tmp_partition_mount_options + [ 'nosuid' ] }}"
notify: Writing and remounting tmp
when: ubtu22cis_rule_1_1_2_4
tags:
Expand Down

0 comments on commit ae0e66d

Please sign in to comment.