From 7aea74598b41bbe8e0f2adbc5857d3befeafcd11 Mon Sep 17 00:00:00 2001 From: Murali Krishnasamy Date: Tue, 30 Nov 2021 14:29:39 -0500 Subject: [PATCH] badfish library for scaleup tasks --- .../roles/scale-node-prep/tasks/main.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/ansible-ipi-install/roles/scale-node-prep/tasks/main.yml b/ansible-ipi-install/roles/scale-node-prep/tasks/main.yml index e5453385b6..707645223c 100644 --- a/ansible-ipi-install/roles/scale-node-prep/tasks/main.yml +++ b/ansible-ipi-install/roles/scale-node-prep/tasks/main.yml @@ -30,6 +30,18 @@ virtualenv_command: /usr/bin/python3 -m venv virtualenv: "{{ badfish_venv }}" +- name: detect python version + shell: | + {{ python_interpreter }} --version | awk '{print $2}' + register: python_version + +- name: Include library + shell: + chdir: "{{ badfish_tempdir.path }}" + cmd: | + source {{ badfish_venv }}/bin/activate + ln -s {{ badfish_tempdir.path }}/src/helpers/ {{ badfish_venv }}/lib/python{{ python_version.stdout.split('.')[0] }}.{{ python_version.stdout.split('.')[1] }}/site-packages/helpers + - name: Clean network interfaces created by lab automation shell: | /root/clean-interfaces.sh --nuke