- Remove duplicate firewall include_role from base role (#18) - Move remote_user from [ssh_connection] to [defaults] in ansible.cfg (#20) - Add set -euo pipefail to run.sh (#21) - Delete orphaned playbook_handlers.yml (#22) - Fix changed_when: true in debian tasks (#23) - Add tailscale_authkey env var lookup with TAILSCALE_KEY fallback (#25) - Document -K requirement in bootstrap.yml (#26) - Replace bare ansible_host=mail/git with IP addresses (#27) - Update findings.md
47 lines
1.1 KiB
YAML
47 lines
1.1 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"
|
|
|
|
|