From 1bfabcde5e5eb818b0a98f8f26afe658c5d73085 Mon Sep 17 00:00:00 2001 From: Lennard Brinkhaus Date: Mon, 11 Sep 2023 22:23:53 +0200 Subject: [PATCH] fix: complete install --- defaults/main.yml | 2 +- tasks/configure.yml | 11 +++++++++++ tasks/install.yml | 6 ++++++ tasks/install_aardvark_dns.yml | 3 ++- tasks/install_conmon.yml | 1 + tasks/install_crun.yml | 1 + tasks/install_netavark.yml | 2 ++ tasks/install_podman.yml | 1 + tasks/main.yml | 1 - templates/containers.conf | 2 ++ vars/debian.yml | 2 +- 11 files changed, 28 insertions(+), 4 deletions(-) create mode 100644 templates/containers.conf diff --git a/defaults/main.yml b/defaults/main.yml index 4fec1ae..c46bd42 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -1,6 +1,6 @@ --- podman_version_check: true -podman_version: "4.6.0" +podman_version: "v4.6.2" podman_netavark_version: "v1.7.0" podman_conmon_version: "v2.1.7" podman_aardvark_dns_version: "v1.7.0" diff --git a/tasks/configure.yml b/tasks/configure.yml index f02265a..37bb64b 100644 --- a/tasks/configure.yml +++ b/tasks/configure.yml @@ -26,6 +26,12 @@ dest: "{{ podman_containers_config }}/registries.conf" mode: 0600 +- name: Copy registries.json + ansible.builtin.template: + src: containers.conf + dest: "{{ podman_containers_config }}/containers.conf" + mode: 0600 + - name: "Create registries.conf.d folder" file: path: "{{ podman_containers_config }}/registries.conf.d" @@ -38,3 +44,8 @@ src: registries.conf.d/shortnames.conf dest: "{{ podman_containers_config }}/registries.conf.d/shortnames.conf" mode: 0600 + +- name: Add podman folder to $PATH + ansible.builtin.copy: + dest: /etc/profile.d/podman.sh + content: 'PATH=$PATH:/usr/libexec/podman' diff --git a/tasks/install.yml b/tasks/install.yml index 63c36b8..741dd1b 100644 --- a/tasks/install.yml +++ b/tasks/install.yml @@ -6,3 +6,9 @@ - include_tasks: install_netavark.yml - include_tasks: install_aardvark_dns.yml + +- include_tasks: install_crun.yml + +- include_tasks: configure.yml + +- include_tasks: install_podman.yml diff --git a/tasks/install_aardvark_dns.yml b/tasks/install_aardvark_dns.yml index a0a5705..8bfddd0 100644 --- a/tasks/install_aardvark_dns.yml +++ b/tasks/install_aardvark_dns.yml @@ -5,6 +5,7 @@ clone: yes update: yes version: "{{ podman_aardvark_dns_version }}" + force: true - name: Build 'all' target with extra arguments make: @@ -23,4 +24,4 @@ dest: "/usr/libexec/podman/aardvark-dns" force: true remote_src: true - + mode: +x diff --git a/tasks/install_conmon.yml b/tasks/install_conmon.yml index fab0846..20a3595 100644 --- a/tasks/install_conmon.yml +++ b/tasks/install_conmon.yml @@ -5,6 +5,7 @@ clone: yes update: yes version: "{{ podman_conmon_version }}" + force: true - name: Build 'all' target with extra arguments make: diff --git a/tasks/install_crun.yml b/tasks/install_crun.yml index 3870148..1bf17e8 100644 --- a/tasks/install_crun.yml +++ b/tasks/install_crun.yml @@ -5,6 +5,7 @@ clone: yes update: yes version: "{{ podman_crun_version }}" + force: true - name: Execute autogen.sh shell: diff --git a/tasks/install_netavark.yml b/tasks/install_netavark.yml index d55fd6f..4c48df2 100644 --- a/tasks/install_netavark.yml +++ b/tasks/install_netavark.yml @@ -5,6 +5,7 @@ clone: yes update: yes version: "{{ podman_netavark_version }}" + force: true - name: Build 'all' target with extra arguments make: @@ -26,3 +27,4 @@ dest: "/usr/libexec/podman/netavark" force: true remote_src: true + mode: +x diff --git a/tasks/install_podman.yml b/tasks/install_podman.yml index ca1708f..d648909 100644 --- a/tasks/install_podman.yml +++ b/tasks/install_podman.yml @@ -5,6 +5,7 @@ clone: yes update: yes version: "{{ podman_version }}" + force: true - name: Build 'all' target with extra arguments make: diff --git a/tasks/main.yml b/tasks/main.yml index faf86b5..8a1f316 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -4,4 +4,3 @@ - include_tasks: install.yml -- include_tasks: configure.yml diff --git a/templates/containers.conf b/templates/containers.conf new file mode 100644 index 0000000..0ba59e5 --- /dev/null +++ b/templates/containers.conf @@ -0,0 +1,2 @@ +[network] +network_backend="netavark" diff --git a/vars/debian.yml b/vars/debian.yml index 7cf8215..cd1e151 100644 --- a/vars/debian.yml +++ b/vars/debian.yml @@ -6,7 +6,7 @@ podman_build_deps: - pkg-config - btrfs-progs - go-md2man - #- iptables + - iptables - libassuan-dev - libbtrfs-dev - libc6-dev