Compare commits

...

3 Commits

3 changed files with 26 additions and 4 deletions

View File

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

View File

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

View File

@@ -29,6 +29,25 @@
ansible.builtin.set_fact: ansible.builtin.set_fact:
system_cfg: "{{ system_defaults | combine(system | default({}), recursive=True) | combine(system_cfg, recursive=True) }}" 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 - name: Derive convenience facts from pre-computed system_cfg
when: when:
- system_cfg is defined - system_cfg is defined