feat(global_defaults): add system.mirror to schema and normalization
This commit is contained in:
@@ -82,6 +82,7 @@ system_defaults:
|
|||||||
timezone: "Europe/Vienna"
|
timezone: "Europe/Vienna"
|
||||||
locale: "en_US.UTF-8"
|
locale: "en_US.UTF-8"
|
||||||
keymap: "us"
|
keymap: "us"
|
||||||
|
mirror: ""
|
||||||
packages: []
|
packages: []
|
||||||
disks: []
|
disks: []
|
||||||
users: []
|
users: []
|
||||||
|
|||||||
@@ -10,6 +10,10 @@
|
|||||||
if (system_raw.name | default('') | string | trim | length) > 0
|
if (system_raw.name | default('') | string | trim | length) > 0
|
||||||
else inventory_hostname
|
else inventory_hostname
|
||||||
}}
|
}}
|
||||||
|
_mirror_defaults:
|
||||||
|
debian: "https://deb.debian.org/debian/"
|
||||||
|
ubuntu: "http://mirror.ubuntu.com/ubuntu/"
|
||||||
|
ubuntu-lts: "http://mirror.ubuntu.com/ubuntu/"
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
system_cfg:
|
system_cfg:
|
||||||
# --- Identity & platform ---
|
# --- Identity & platform ---
|
||||||
@@ -67,6 +71,12 @@
|
|||||||
timezone: "{{ system_raw.timezone | string }}"
|
timezone: "{{ system_raw.timezone | string }}"
|
||||||
locale: "{{ system_raw.locale | string }}"
|
locale: "{{ system_raw.locale | string }}"
|
||||||
keymap: "{{ system_raw.keymap | string }}"
|
keymap: "{{ system_raw.keymap | string }}"
|
||||||
|
mirror: >-
|
||||||
|
{{
|
||||||
|
system_raw.mirror | string | trim
|
||||||
|
if (system_raw.mirror | default('') | string | trim | length) > 0
|
||||||
|
else _mirror_defaults[system_raw.os | default('') | string | lower] | default('')
|
||||||
|
}}
|
||||||
path: "{{ system_raw.path | default('') | string }}"
|
path: "{{ system_raw.path | default('') | string }}"
|
||||||
packages: >-
|
packages: >-
|
||||||
{{
|
{{
|
||||||
|
|||||||
Reference in New Issue
Block a user