From b71c8b9f92fdad8692b6cb874ecc890923788e10 Mon Sep 17 00:00:00 2001 From: f Date: Sat, 18 Jun 2022 19:48:16 -0300 Subject: [PATCH] make alpine version configurable closes #1 --- alpines.yml | 2 ++ tasks/install.yml | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/alpines.yml b/alpines.yml index a6f62bc..99373aa 100644 --- a/alpines.yml +++ b/alpines.yml @@ -3,6 +3,8 @@ remote_user: "root" strategy: "free" vars: + alpine_version: 3.16 + apk_version: 2.12.9-r3 packages: - alpine-base - linux-virt diff --git a/tasks/install.yml b/tasks/install.yml index a6dafb5..4c3bf95 100644 --- a/tasks/install.yml +++ b/tasks/install.yml @@ -1,10 +1,10 @@ --- - name: "Download and install APK static into the host system." - shell: "cd / && curl http://dl-cdn.alpinelinux.org/alpine/v3.15/main/x86_64/apk-tools-static-2.12.7-r3.apk | tar -xvzf - sbin/apk.static" + shell: "cd / && curl http://dl-cdn.alpinelinux.org/alpine/v{{ alpine_version }}/main/x86_64/apk-tools-static-{{ apk_version }}.apk | tar -xvzf - sbin/apk.static" args: creates: "/sbin/apk.static" - name: "Perform installation in a mostly secure way. First install keys insecurely." - shell: "apk.static -X http://dl-cdn.alpinelinux.org/alpine/v3.15/main --root /mnt --arch x86_64 --initdb --allow-untrusted add alpine-keys" + shell: "apk.static -X http://dl-cdn.alpinelinux.org/alpine/v{{ alpine_version }}/main --root /mnt --arch x86_64 --initdb --allow-untrusted add alpine-keys" args: creates: "/mnt/etc/apk/keys" - name: "Enable repositories."