From 890c7646fab19307dae45c54e008114c47bcdc5f Mon Sep 17 00:00:00 2001 From: NaeiKinDus Date: Sun, 7 Jul 2024 00:00:00 +0000 Subject: [PATCH] refactor(development): use kubectl role instead of custom code --- .../roles/development/tasks/main.yml | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/collections/ansible_collections/nullified/infrastructure/roles/development/tasks/main.yml b/collections/ansible_collections/nullified/infrastructure/roles/development/tasks/main.yml index 75a3a40..73e356f 100644 --- a/collections/ansible_collections/nullified/infrastructure/roles/development/tasks/main.yml +++ b/collections/ansible_collections/nullified/infrastructure/roles/development/tasks/main.yml @@ -157,22 +157,9 @@ cmds: - dpkg -i {asset_dirname}/{asset_filename} -- name: '[custom] install latest kubectl' - become: true - block: - - name: '[kubectl] find latest version available' - ansible.builtin.command: - cmd: curl -L -s https://dl.k8s.io/release/stable.txt - register: latest_kube_version - changed_when: false - - - name: '[kubectl] fetch binary' - ansible.builtin.get_url: - url: "https://dl.k8s.io/release/{{ latest_kube_version.stdout }}/bin/linux/amd64/kubectl" - dest: /usr/local/bin/kubectl - owner: root - group: root - mode: '0755' +- name: install kubectl + ansible.builtin.include_role: + name: nullified.infrastructure.kubectl - name: install helm ansible.builtin.include_role: