fix(bootstrap): deploy all non-EOL core distros (keyrings, repos, versions)
This commit is contained in:
@@ -3,9 +3,7 @@
|
||||
vars:
|
||||
bootstrap_debian_release: >-
|
||||
{{
|
||||
'buster' if (os_version | string) == '10'
|
||||
else 'bullseye' if (os_version | string) == '11'
|
||||
else 'bookworm' if (os_version | string) == '12'
|
||||
'bookworm' if (os_version | string) == '12'
|
||||
else 'trixie' if (os_version | string) == '13'
|
||||
else 'sid' if (os_version | string) == 'unstable'
|
||||
else 'trixie'
|
||||
@@ -28,10 +26,24 @@
|
||||
fail_msg: "{{ bootstrap_var_key }} must be a dict with base/extra/conditional keys."
|
||||
quiet: true
|
||||
|
||||
- name: Check for a debootstrap script for the target release
|
||||
ansible.builtin.stat:
|
||||
path: "/usr/share/debootstrap/scripts/{{ bootstrap_debian_release }}"
|
||||
register: bootstrap_debian_script
|
||||
|
||||
- name: Symlink a missing debootstrap script to the sid base
|
||||
ansible.builtin.file:
|
||||
src: sid
|
||||
dest: "/usr/share/debootstrap/scripts/{{ bootstrap_debian_release }}"
|
||||
state: link
|
||||
when: not bootstrap_debian_script.stat.exists
|
||||
|
||||
- name: Install Debian base system
|
||||
ansible.builtin.command: >-
|
||||
debootstrap --include={{ bootstrap_debian_base_csv }}
|
||||
{{ bootstrap_debian_release }} /mnt {{ system_cfg.mirror }}
|
||||
debootstrap --keyring=/usr/share/keyrings/debian-archive-keyring.gpg
|
||||
--include={{ bootstrap_debian_base_csv }}
|
||||
{{ bootstrap_debian_release }} /mnt
|
||||
{{ system_cfg.mirror | default('http://deb.debian.org/debian', true) }}
|
||||
register: bootstrap_debian_base_result
|
||||
changed_when: bootstrap_debian_base_result.rc == 0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user