diff --git a/playbooks/gather_npu_fact.yml b/playbooks/gather_npu_fact.yml index 1fd4cfd3e5ebcaa82425ee9f957c6b767146a8c2..30ede07f070cd2af266aace3122ae9b919a645aa 100644 --- a/playbooks/gather_npu_fact.yml +++ b/playbooks/gather_npu_fact.yml @@ -11,13 +11,13 @@ - name: set resources_dir local set_fact: resources_dir: "../resources" - cacheable: yes + cacheable: yes when: ansible_connection == "local" - name: set resources_dir remote set_fact: resources_dir: "~/resources" - cacheable: yes + cacheable: yes when: ansible_connection != "local" - local_action: stat path={{os_and_arch}}.yml diff --git a/start_download.sh b/start_download.sh index 10a8e685ba1b4b0dcabdeda509c7caabce9b3302..e03885b92e04e1c7beb6ecf62160290c575a5eb9 100755 --- a/start_download.sh +++ b/start_download.sh @@ -1,3 +1,14 @@ #!/bin/bash +have_python3=`command -v python3 | wc -l` +have_yum=`command -v python3 | wc -l` +have_apt=`command -v apt | wc -l` +if [ ${have_python3} -eq 0 ];then + if [ ${have_yum} -eq 1 ];then + yum install -y python3 + fi + if [ ${have_apt} -eq 1 ];then + DEBIAN_FRONTEND=noninteractive apt -y install python3 + fi +fi python3 downloader/downloader.py python3 downloader/other_downloader.py