Files
ansible-pull/roles/base/tasks/main.yml
T
rene 31a6a3e3d7 facts: migrate bare ansible_* facts to ansible_facts[]
ansible-core deprecates injecting top-level facts as variables
(INJECT_FACTS_AS_VARS) and will stop doing so in 2.24. Convert all
remaining bare fact references (ansible_default_ipv4/ipv6, os_family,
distribution_release, date_time, ...) to the ansible_facts[] form.

Also fixes a typo (ansbile_date_time) in the postfix backup task.
2026-10-22 18:22:34 +02:00

52 lines
1.8 KiB
YAML
Executable File

# Load distro-specific variables
- include_vars: "{{ ansible_facts['distribution'] | lower }}.yml"
tags: always
ignore_errors: True
- block:
- debug:
msg: Debug
# Set up the ansible environment
- import_tasks: ansible_setup.yml
# basics
- import_tasks: system_setup/hostname.yml
- import_tasks: system_setup/hosts.yml
- import_tasks: system_setup/clock.yml
- import_tasks: system_setup/locale.yml
- import_tasks: system_setup/wireguard.yml
when:
- wireguard is defined
- wireguard == true
- ansible_facts['default_ipv4']['address'] | ansible.utils.ipaddr('public') | length > 0
ignore_errors: True
- import_tasks: system_setup/git.yml
# install software
# - import_tasks: software/repositories.yml
- import_tasks: software/packages_zsh.yml
# - import_tasks: software/packages_development.yml
- import_tasks: software/packages_cleanup.yml
# - import_tasks: software/packages_pip.yml
- import_tasks: software/packages_utilities.yml
# Perform remaining tasks:
- import_tasks: users.yml
- import_tasks: system_setup/cron.yml
# - import_tasks: system_setup/logging.yml
# - import_tasks: system_setup/memory.yml
# - import_tasks: system_setup/microcode.yml
- import_tasks: system_setup/openssh.yml
- import_tasks: system_setup/scripts.yml
- import_tasks: system_setup/disable_standby.yml
when: is_proxmox is defined and is_proxmox == true
- import_tasks: software/wazuh-agent.yml
when: ansible_facts['distribution'] in ["Debian", "Pop!_OS", "Ubuntu", "Linux Mint", "Archlinux"]
- import_tasks: system_setup/disable_standby.yml
when: is_proxmox is defined and is_proxmox == true
- import_tasks: system_setup/import_stepca.yml
when: "'nameserver' not in group_names"
rescue:
- set_fact: task_failed=true