Compare commits

..

3 Commits

3 changed files with 26 additions and 4 deletions

View File

@@ -273,7 +273,6 @@ bootstrap_ubuntu:
- syslog-ng
- systemd-zram-generator
- tcpd
- tldr
- traceroute
- util-linux-extra
- vim
@@ -281,7 +280,11 @@ bootstrap_ubuntu:
- yq
- zoxide
- zstd
conditional: "{{ bootstrap_common_conditional }}"
conditional: >-
{{
(['tldr'] if (os_version | default('') | string | length) > 0 else [])
+ bootstrap_common_conditional
}}
bootstrap_archlinux:
base:

View File

@@ -12,8 +12,8 @@
}}
_mirror_defaults:
debian: "https://deb.debian.org/debian/"
ubuntu: "http://mirror.ubuntu.com/ubuntu/"
ubuntu-lts: "http://mirror.ubuntu.com/ubuntu/"
ubuntu: "http://archive.ubuntu.com/ubuntu/"
ubuntu-lts: "http://archive.ubuntu.com/ubuntu/"
ansible.builtin.set_fact:
system_cfg:
# --- Identity & platform ---

View File

@@ -29,6 +29,25 @@
ansible.builtin.set_fact:
system_cfg: "{{ system_defaults | combine(system | default({}), recursive=True) | combine(system_cfg, recursive=True) }}"
- name: Apply mirror default for pre-computed system_cfg
when:
- system_cfg is defined
- _bootstrap_needs_enrichment | default(false) | bool
- system_cfg.mirror | default('') | string | trim | length == 0
vars:
# Same as _normalize_system.yml — kept in sync manually.
_mirror_defaults:
debian: "https://deb.debian.org/debian/"
ubuntu: "http://archive.ubuntu.com/ubuntu/"
ubuntu-lts: "http://archive.ubuntu.com/ubuntu/"
ansible.builtin.set_fact:
system_cfg: >-
{{
system_cfg | combine({
'mirror': _mirror_defaults[system_cfg.os | default('') | string | lower] | default('')
}, recursive=True)
}}
- name: Derive convenience facts from pre-computed system_cfg
when:
- system_cfg is defined