53 lines
1.3 KiB
YAML
53 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
|
|
when: not (skip_user_management | default(false))
|
|
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"
|
|
|
|
|