infra/ansible/roles/almalinux/tasks/main.yml
2025-10-12 10:07:12 -05:00

58 lines
1.2 KiB
YAML
Executable file

---
- name: "Enable passwordless sudo on AlmaLinux"
ansible.builtin.lineinfile:
path: /etc/sudoers
state: present
regexp: "^%wheel"
line: "%wheel ALL=(ALL) NOPASSWD: ALL"
validate: "visudo -cf %s"
- name: Install EPEL repo
ansible.builtin.yum:
name: epel-release
state: present
- name: Clean DNF cache
ansible.builtin.command: dnf clean all
changed_when: false
- name: Upgrade all packages
ansible.builtin.dnf:
name: "*"
state: latest
- name: Install required software
ansible.builtin.dnf:
state: present
name:
- bind-utils
- lsof
- htop
- btop
- mosh
- rsync
- tmux
- nano
- the-silver-searcher
- net-tools
- plocate
- fail2ban
- munin-node
# - nethogs # Not available in AlmaLinux EPEL
- pv
- selinux-policy
- tar
- unzip
- qemu-guest-agent
- python3-libselinux
- name: Create a user for andys
ansible.builtin.user:
name: andy
groups:
- wheel
state: present
# - name: Put SELinux in permissive mode, logging actions that would be blocked.
# ansible.posix.selinux:
# policy: targeted
# state: permissive