infra/ansible/roles/base/tasks/main.yml
Graham McIntire fb5803c866
add FreeBSD bootstrap, irc servers, hostname overrides, and cleanups
- bootstrap.yml: support pkg for FreeBSD sudo/python3 install
- base role: FreeBSD package sets, sudoers paths, host key regen, admin group, usermod process-in-use tolerance
- freebsd role: pkg update/upgrade tasks
- general role: standalone hostname tasks (ungated from network.skip), hostname_override support
- inspircd role: deploy configs for ca/us manero.org irc servers with vault-backed secrets
- uisp role: download and run installer on fresh hosts, skip if already running
- netbox role: stop services before usermod to avoid process-in-use failures
- hosts: add irc_servers group, ca/us.manero.org (Tailscale), drop staging.towerops.net
- all.yml: graham user gets static ed25519 key alongside github keys
2026-06-19 17:19:29 -05:00

52 lines
1.3 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 FreeBSD-specific configuration
ansible.builtin.include_role:
name: freebsd
when: ansible_facts['os_family'] == "FreeBSD"