- Convert ~290 short module names to FQCNs across all roles - Change become: yes/no to become: true/false, gather_facts: no to false - Remove deprecated inject_facts_as_vars from ansible.cfg - Add missing task names to import_tasks/include_role calls - Add become: yes to librenms clone task (partial-become fix) - Add pipefail to risky shell command in udp-gro-fix.yml - Quote all octal mode values - Harden .ansible-lint with production profile and empty skip_list - Update findings.md with all fixes
57 lines
1.4 KiB
YAML
57 lines
1.4 KiB
YAML
---
|
|
# Base role - combines bootstrap and common functionality
|
|
|
|
# Initial system information
|
|
- name: Show hostname
|
|
ansible.builtin.debug:
|
|
msg: "{{ ansible_facts['hostname'] }}"
|
|
|
|
- name: Show IPv4 address
|
|
ansible.builtin.debug:
|
|
msg: "{{ ansible_facts['default_ipv4']['address'] }}"
|
|
when: ansible_facts['default_ipv4']['address'] is defined
|
|
|
|
- name: Show IPv6 address
|
|
ansible.builtin.debug:
|
|
msg: "{{ ansible_facts['default_ipv6']['address'] }}"
|
|
when: ansible_facts['default_ipv6']['address'] is defined
|
|
|
|
- name: Install base packages
|
|
ansible.builtin.import_tasks: packages.yml
|
|
tags:
|
|
- packages
|
|
- common
|
|
|
|
- name: Configure users and groups
|
|
ansible.builtin.import_tasks: users.yml
|
|
tags:
|
|
- users
|
|
- bootstrap
|
|
|
|
- name: Configure system settings
|
|
ansible.builtin.import_tasks: system.yml
|
|
tags:
|
|
- system
|
|
- common
|
|
|
|
- name: Apply AlmaLinux-specific configuration
|
|
ansible.builtin.include_role:
|
|
name: almalinux
|
|
when: ansible_facts['os_family'] == "RedHat"
|
|
|
|
- name: Apply Debian-specific configuration
|
|
ansible.builtin.include_role:
|
|
name: debian
|
|
when: ansible_facts['os_family'] == "Debian"
|
|
|
|
- name: Apply Alpine-specific configuration
|
|
ansible.builtin.include_role:
|
|
name: alpine
|
|
when: ansible_facts['os_family'] == "Alpine"
|
|
|
|
# Firewall configuration
|
|
- include_role:
|
|
name: firewall
|
|
when: firewall_enabled | default(true)
|
|
tags:
|
|
- firewall
|