From 5d02c25736cf21e30ca843673fb564b9dac08dd7 Mon Sep 17 00:00:00 2001 From: blacs30 Date: Thu, 24 Sep 2020 23:36:40 +0200 Subject: [PATCH] Only install socat if not present. --- roles/kubernetes/node/tasks/install.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/roles/kubernetes/node/tasks/install.yml b/roles/kubernetes/node/tasks/install.yml index 339c43df3ad..08201e023cf 100644 --- a/roles/kubernetes/node/tasks/install.yml +++ b/roles/kubernetes/node/tasks/install.yml @@ -46,8 +46,15 @@ - kubelet - upgrade +- name: install | Check if socat is installed + shell: command -v socat >/dev/null 2>&1 + register: is_socat_exist + ignore_errors: yes + - name: install | Copy socat wrapper for Container Linux command: "{{ docker_bin_dir }}/docker run --rm -v {{ bin_dir }}:/opt/bin {{ install_socat_image_repo }}:{{ install_socat_image_tag }}" args: creates: "{{ bin_dir }}/socat" - when: ansible_os_family in ['Flatcar Container Linux by Kinvolk'] + when: + - ansible_os_family in ['Flatcar Container Linux by Kinvolk'] + - is_socat_exist.rc != 0