From 0711d31a31e4c69e78594d4554fbdfb3e39e80ad Mon Sep 17 00:00:00 2001 From: MozeBaltyk Date: Tue, 14 May 2024 16:03:04 +0200 Subject: [PATCH] adding hauler store --- roles/install_utils_nerdctl/tasks/install.yml | 25 +++++++++++++++---- .../install_utils_nerdctl/tasks/prerequis.yml | 2 ++ 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/roles/install_utils_nerdctl/tasks/install.yml b/roles/install_utils_nerdctl/tasks/install.yml index 2d74e7625..83ddb22be 100644 --- a/roles/install_utils_nerdctl/tasks/install.yml +++ b/roles/install_utils_nerdctl/tasks/install.yml @@ -10,17 +10,32 @@ path: /usr/local/bin/nerdctl register: file_data -- name: Download Nerdctl bin into /usr/local/bin +#- name: Download Nerdctl bin into /usr/local/bin +# ansible.builtin.unarchive: +# src: "http://{{ hauler_server }}:8080/nerdctl.tar.gz" +# dest: "/usr/local/bin/" +# owner: "{{ admin_user }}" +# group: "{{ admin_user }}" +# mode: '0750' +# remote_src: true +# validate_certs: false +# extra_opts: ['--strip-components=1'] +# when: not file_data.stat.exists + +- name: Download Nerdctl archive + ansible.builtin.get_url: + url: "http://{{ hauler_server }}:8080/nerdctl.tar.gz" + dest: "/usr/local/bin/nerdctl-archive.tar.gz" + validate_certs: false + +- name: Unarchive Nerdctl ansible.builtin.unarchive: - src: "http://{{ hauler_server }}:8080/nerdctl.tar.gz" + src: "/usr/local/bin/nerdctl-archive.tar.gz" dest: "/usr/local/bin/" owner: "{{ admin_user }}" group: "{{ admin_user }}" mode: '0750' remote_src: true - validate_certs: false - extra_opts: ['--strip-components=1'] - when: not file_data.stat.exists - name: Copy NERDCTL configuration file ansible.builtin.template: diff --git a/roles/install_utils_nerdctl/tasks/prerequis.yml b/roles/install_utils_nerdctl/tasks/prerequis.yml index 94eb82950..53af4571c 100644 --- a/roles/install_utils_nerdctl/tasks/prerequis.yml +++ b/roles/install_utils_nerdctl/tasks/prerequis.yml @@ -7,6 +7,7 @@ with_items: - tar - gzip + - unzip become: true when: - ansible_os_family == "RedHat" @@ -19,6 +20,7 @@ with_items: - tar - gzip + - unzip become: true when: - ansible_os_family == "Debian"