Files
alexandre.pires b692627317 Add configuration and playbook for virtualization host setup
- Create host variable file for vh-01.alexpires.dev with user, SSH, firewall, and VM configurations.
- Update playbook_duo_security.yml to target the 2fa group.
- Introduce playbook_virt_host.yml for setting up GPU passthrough on Fedora with QEMU/KVM.
- Add required collections to requirements.yml for Podman and Libvirt.
- Modify ctrlaltdel.yml to remove existing symlink for ctrl-alt-del.target before masking it.
- Enhance users.yml to show warnings for users that could not be removed.
- Update Duo Security role to use the correct repository and package names.
- Improve login role to handle user UID and group assignments.
- Create udev rules template for NVMe devices.
- Add blacklist template for VFIO drivers.
- Implement domain XML template for virtual machines with detailed configurations.
- Update inventory to include vh-01.alexpires.dev in relevant groups.
- Refactor cpu_power_monitor.py for improved error handling and modularity.
2025-05-31 00:28:04 +02:00

44 lines
993 B
YAML

---
- name: Remove users
become: true
ansible.builtin.user:
name: "{{ item }}"
state: absent
remove: true
loop: "{{ delete_users }}"
register: remove_users
ignore_errors: true
tags:
- users
- name: Show warning for users that could not be removed
debug:
msg: "Could not remove user '{{ item.item }}'. Error: {{ item.msg | default('unknown error') }}"
loop: "{{ remove_users.results | selectattr('failed', 'equalto', true) | list }}"
when: remove_users is defined
tags:
- users
- name: Stat user /home directories
ansible.builtin.find:
paths: /home
file_type: directory
register: home_directories
tags:
- users
- CIS-UBUNTU2004-6.2.6
- M1022
- name: Set user /home directories permission
become: true
ansible.builtin.file:
mode: "0750"
path: "{{ item.path }}"
with_items: "{{ home_directories.files }}"
loop_control:
label: "{{ item.path }}"
tags:
- users
- CIS-UBUNTU2004-6.2.6
- M1022