kopia lustrzana https://github.com/piku/piku
Avoid install python2 each time at pre_task
Python2 check, miss a parenthesis for apt-get and update. ``` ( /usr/bin/python --version 2>&1 | grep -c 'Python' > /dev/null ) || apt-get update && apt-get -y install python ``` becomes to ``` (( /usr/bin/python --version 2>&1 | grep -c 'Python' > /dev/null ) || apt-get update ) && apt-get -y install python ``` so `apt-get -y install python` ever is executed even Python2 it's present then we need to put update and install together ``` ( /usr/bin/python --version 2>&1 | grep -c 'Python' > /dev/null ) || ( apt-get update && apt-get -y install python ) ```pull/148/head
rodzic
68351f56b8
commit
e02b1acae8
|
@ -4,7 +4,7 @@
|
|||
gather_facts: no
|
||||
pre_tasks:
|
||||
- name: Install python2 required by Ansible
|
||||
raw: "( /usr/bin/python --version 2>&1 | grep -c 'Python' > /dev/null ) || apt-get update && apt-get -y install python"
|
||||
raw: "( /usr/bin/python --version 2>&1 | grep -c 'Python' > /dev/null ) || ( apt-get update && apt-get -y install python )"
|
||||
|
||||
- hosts: all
|
||||
become: yes
|
||||
|
|
Ładowanie…
Reference in New Issue