ansible-lockdown / UBUNTU22-CIS

Ansible role for Ubuntu22 CIS Baseline
https://ansible-lockdown.readthedocs.io/en/latest/
MIT License
181 stars 80 forks source link

Enhancing the way tasks for rules 1.1.2.2, 1.1.2.3, and 1.1.2.4 are written #199

Closed DianaMariaDDM closed 2 months ago

DianaMariaDDM commented 8 months ago

Feature Request or Enhancement

I want to propose an enhancement for tasks 1.1.2.2, 1.1.2.3, and 1.1.2.4 .

Summary of Request Given the fact that we have two multi-line tasks that tackle the same rules only with different methods, we could create separate tasks for each rule. Each task will append the value of the option for the mount point to a list type of variable (e.g. tmp_partition_mount_options) using the ansible set_fact module.

We can create handler tasks that do the actual writing of the tmp file based on each method, using tmp_systemd or using fstab.

The variable that contains the options can be initialized in a prelim task.

Describe Alternatives You've Considered None, really.

Suggested Code The suggested code will be provided in a PR!

uk-bolly commented 2 months ago

Closing as PR closed