From 89adf1f8c5d6584545cfdaf64888b40e8095c075 Mon Sep 17 00:00:00 2001 From: MozeBaltyk Date: Tue, 14 May 2024 15:26:43 +0200 Subject: [PATCH] adding hauler store --- .github/workflows/stage.yml | 7 ------ meta/ee-bindeps.txt | 4 ++++ roles/install_rke2_common/tasks/common.yml | 22 +++++++++++++++++ .../tasks/rpm_install.yml | 11 --------- roles/install_utils_nerdctl/tasks/install.yml | 1 + roles/install_utils_nerdctl/tasks/main.yml | 4 +++- .../install_utils_nerdctl/tasks/prerequis.yml | 24 +++++++++++++++++++ 7 files changed, 54 insertions(+), 19 deletions(-) create mode 100644 roles/install_utils_nerdctl/tasks/prerequis.yml diff --git a/.github/workflows/stage.yml b/.github/workflows/stage.yml index ba560adb6..06b12de57 100644 --- a/.github/workflows/stage.yml +++ b/.github/workflows/stage.yml @@ -62,13 +62,6 @@ jobs: s3fs ${BUCKET} ${MOUNT_POINT} -o url=https://${REGION}.digitaloceanspaces.com -o passwd_file=./passwd-s3fs df -Th ${MOUNT_POINT} - - name: Test access Mount point - run: | - ls -ld ${MOUNT_POINT} - ls -l ${MOUNT_POINT} - cd ${MOUNT_POINT} - ls - - name: Checkout files uses: actions/checkout@v4 diff --git a/meta/ee-bindeps.txt b/meta/ee-bindeps.txt index 0071d0def..98a5615bb 100644 --- a/meta/ee-bindeps.txt +++ b/meta/ee-bindeps.txt @@ -14,3 +14,7 @@ zstd [platform:rpm] zstd [platform:dpkg] jq [platform:rpm] jq [platform:dpkg] +tar [platform:rpm] +tar [platform:dpkg] +gzip [platform:rpm] +gzip [platform:dpkg] diff --git a/roles/install_rke2_common/tasks/common.yml b/roles/install_rke2_common/tasks/common.yml index 3d996d62b..86ae412c8 100644 --- a/roles/install_rke2_common/tasks/common.yml +++ b/roles/install_rke2_common/tasks/common.yml @@ -32,3 +32,25 @@ dest: /var/lib/rancher/rke2 state: link when: rke2_data_dir != "/var/lib/rancher/rke2" + +# Common packages on all nodes +- name: Install packages common + ansible.builtin.dnf: + name: "{{ item }}" + state: present + with_items: + - zstd + become: true + when: + - ansible_os_family == "RedHat" + - ansible_distribution_major_version | int >= 8 + +- name: Install packages common + ansible.builtin.apt: + name: "{{ item }}" + state: present + with_items: + - zstd + become: true + when: + - ansible_os_family == "Debian" diff --git a/roles/install_rke2_controller/tasks/rpm_install.yml b/roles/install_rke2_controller/tasks/rpm_install.yml index 4624b2435..14194a274 100644 --- a/roles/install_rke2_controller/tasks/rpm_install.yml +++ b/roles/install_rke2_controller/tasks/rpm_install.yml @@ -1,16 +1,5 @@ --- # RPM -- name: Install packages common to controlers - ansible.builtin.dnf: - name: "{{ item }}" - state: present - with_items: - - zstd - become: true - when: - - ansible_os_family == "RedHat" - - ansible_distribution_major_version | int >= 8 - - name: Import a key from a file ansible.builtin.rpm_key: state: present diff --git a/roles/install_utils_nerdctl/tasks/install.yml b/roles/install_utils_nerdctl/tasks/install.yml index a89f6d1f8..2d74e7625 100644 --- a/roles/install_utils_nerdctl/tasks/install.yml +++ b/roles/install_utils_nerdctl/tasks/install.yml @@ -19,6 +19,7 @@ mode: '0750' remote_src: true validate_certs: false + extra_opts: ['--strip-components=1'] when: not file_data.stat.exists - name: Copy NERDCTL configuration file diff --git a/roles/install_utils_nerdctl/tasks/main.yml b/roles/install_utils_nerdctl/tasks/main.yml index a56565618..de428d08b 100644 --- a/roles/install_utils_nerdctl/tasks/main.yml +++ b/roles/install_utils_nerdctl/tasks/main.yml @@ -1,5 +1,7 @@ --- # tasks file for install_utils_nerdctl +- name: Tasks prerequis + ansible.builtin.import_tasks: prerequis.yml - name: Tasks to install nerdctl - ansible.builtin.import_tasks: install.yml \ No newline at end of file + ansible.builtin.import_tasks: install.yml diff --git a/roles/install_utils_nerdctl/tasks/prerequis.yml b/roles/install_utils_nerdctl/tasks/prerequis.yml new file mode 100644 index 000000000..94eb82950 --- /dev/null +++ b/roles/install_utils_nerdctl/tasks/prerequis.yml @@ -0,0 +1,24 @@ +--- +# packages on all nodes needed +- name: Install packages common + ansible.builtin.dnf: + name: "{{ item }}" + state: present + with_items: + - tar + - gzip + become: true + when: + - ansible_os_family == "RedHat" + - ansible_distribution_major_version | int >= 8 + +- name: Install packages common + ansible.builtin.apt: + name: "{{ item }}" + state: present + with_items: + - tar + - gzip + become: true + when: + - ansible_os_family == "Debian"