From 23bcf16fc2e748580357cbca565297e8245e23c1 Mon Sep 17 00:00:00 2001 From: Ivan Cvitkovic Date: Tue, 17 Oct 2023 23:02:03 -0700 Subject: [PATCH] Update default release to bookworm --- molecule/default/Dockerfile.j2 | 8 ++++++++ molecule/default/molecule.yml | 8 +++----- molecule/default/prepare.yml | 7 +++++++ molecule/libvirt/molecule.yml | 4 ++-- molecule/resources/molecule.yml | 2 +- roles/amd_firmware/tasks/main.yaml | 4 ++-- roles/base/tasks/main.yaml | 1 + roles/biostar_firmware/molecule/default/molecule.yml | 2 +- roles/biostar_firmware/tasks/main.yaml | 4 ++-- roles/hp_firmware/tasks/main.yaml | 4 ++-- 10 files changed, 29 insertions(+), 15 deletions(-) create mode 100644 molecule/default/Dockerfile.j2 create mode 100644 molecule/default/prepare.yml diff --git a/molecule/default/Dockerfile.j2 b/molecule/default/Dockerfile.j2 new file mode 100644 index 0000000..238b678 --- /dev/null +++ b/molecule/default/Dockerfile.j2 @@ -0,0 +1,8 @@ +# TODO remove when more tools have deb822 support +# replace deb822-formatted sources file with one-line version +FROM {{ item.image }} + +RUN echo \ +'deb http://deb.debian.org/debian bookworm main\ndeb http://deb.debian.org/debian-security bookworm-security main\ndeb http://deb.debian.org/debian bookworm-updates main' > /etc/apt/sources.list + +RUN rm /etc/apt/sources.list.d/debian.sources diff --git a/molecule/default/molecule.yml b/molecule/default/molecule.yml index 9842098..0605224 100644 --- a/molecule/default/molecule.yml +++ b/molecule/default/molecule.yml @@ -2,14 +2,12 @@ driver: name: docker platforms: - - name: bullseye + - name: bookworm # pin to current debian stable - image: python:3-bullseye - pre_build_image: true + image: python:3-bookworm groups: - amd_firmware - log_collection - # TODO re-enable once updated to bookworm - # - stream_host + - stream_host - gui - hp_firmware diff --git a/molecule/default/prepare.yml b/molecule/default/prepare.yml new file mode 100644 index 0000000..19abbaf --- /dev/null +++ b/molecule/default/prepare.yml @@ -0,0 +1,7 @@ +--- +- name: Update package cache + hosts: all + tasks: + - name: Update apt cache + ansible.builtin.apt: + update_cache: true diff --git a/molecule/libvirt/molecule.yml b/molecule/libvirt/molecule.yml index 5f64bd7..17baf27 100644 --- a/molecule/libvirt/molecule.yml +++ b/molecule/libvirt/molecule.yml @@ -5,11 +5,11 @@ driver: name: libvirt provision: true platforms: - - name: bullseye + - name: bookworm # pin to current debian stable - box: debian/bullseye64 # installing Zoom flatpak requires more than 512 MB memory memory: 1024 + box: debian/bookworm64 groups: - ansible_pull_managed # TODO enable after able to add component idempotently diff --git a/molecule/resources/molecule.yml b/molecule/resources/molecule.yml index 12e48e9..40d7cfc 100644 --- a/molecule/resources/molecule.yml +++ b/molecule/resources/molecule.yml @@ -7,7 +7,7 @@ driver: platforms: - name: instance # pin to current debian stable - image: python:3-bullseye + image: python:3-bookworm pre_build_image: true dependency: name: galaxy diff --git a/roles/amd_firmware/tasks/main.yaml b/roles/amd_firmware/tasks/main.yaml index 60f0ddb..fa3377e 100644 --- a/roles/amd_firmware/tasks/main.yaml +++ b/roles/amd_firmware/tasks/main.yaml @@ -6,8 +6,8 @@ packages: - software-properties-common -- name: Add non-free sources - ansible.builtin.command: apt-add-repository non-free +- name: Add non-free-firmware sources + ansible.builtin.command: apt-add-repository --yes non-free-firmware register: add_component_result notify: - Update package lists diff --git a/roles/base/tasks/main.yaml b/roles/base/tasks/main.yaml index 0f3a9a5..00e2e08 100644 --- a/roles/base/tasks/main.yaml +++ b/roles/base/tasks/main.yaml @@ -8,3 +8,4 @@ - name: Install tool to detect local caching proxies ansible.builtin.apt: name: squid-deb-proxy-client + when: ansible_facts["distribution_major_version"] != "12" diff --git a/roles/biostar_firmware/molecule/default/molecule.yml b/roles/biostar_firmware/molecule/default/molecule.yml index 7eeaade..4e9b692 100644 --- a/roles/biostar_firmware/molecule/default/molecule.yml +++ b/roles/biostar_firmware/molecule/default/molecule.yml @@ -4,7 +4,7 @@ platforms: - name: instance # pin to current debian stable - image: python:3-bullseye + image: python:3-bookworm pre_build_image: true provisioner: name: ansible diff --git a/roles/biostar_firmware/tasks/main.yaml b/roles/biostar_firmware/tasks/main.yaml index 1d07f80..cede927 100644 --- a/roles/biostar_firmware/tasks/main.yaml +++ b/roles/biostar_firmware/tasks/main.yaml @@ -6,8 +6,8 @@ packages: - software-properties-common -- name: Add non-free sources - ansible.builtin.command: apt-add-repository non-free +- name: Add non-free-firmware sources + ansible.builtin.command: apt-add-repository --yes non-free-firmware register: add_component_result notify: - Update package lists diff --git a/roles/hp_firmware/tasks/main.yaml b/roles/hp_firmware/tasks/main.yaml index 35283a5..ee98c3f 100644 --- a/roles/hp_firmware/tasks/main.yaml +++ b/roles/hp_firmware/tasks/main.yaml @@ -6,8 +6,8 @@ packages: - software-properties-common -- name: Add non-free sources - ansible.builtin.command: apt-add-repository non-free +- name: Add non-free-firmware sources + ansible.builtin.command: apt-add-repository --yes non-free-firmware register: add_component_result notify: - Update package lists