diff --git a/ansible.cfg b/ansible.cfg index 5fff0c430..4030a931e 100644 --- a/ansible.cfg +++ b/ansible.cfg @@ -4,3 +4,5 @@ #[defaults] # Disallowed by Ansible 2.11+ -- see https://docs.ansible.com/ansible/devel/porting_guides/porting_guide_2.7.html#using-a-loop-on-a-package-module-via-squash-actions #squash_actions = apk, apt, dnf, homebrew, openbsd_pkg, pacman, pkgng, yum, zypper, package +[defaults] +interpreter_python=/usr/bin/python3 diff --git a/iiab-install b/iiab-install index bf4f7cb3d..de9513616 100755 --- a/iiab-install +++ b/iiab-install @@ -150,7 +150,7 @@ echo -e "Running local playbooks....Stage 0 will now run....followed by Stages $ export ANSIBLE_LOG_PATH="$CWD/iiab-install.log" -ansible -m setup -i $INVENTORY localhost --connection=local -e ansible_python_interpreter=/usr/bin/python3 | grep python -ansible -m setup -i $INVENTORY localhost --connection=local -e ansible_python_interpreter=/usr/bin/python3 >> /dev/null -ansible-playbook -i $INVENTORY $PLAYBOOK ${ARGS} --connection=local -e ansible_python_interpreter=/usr/bin/python3 +ansible -m setup -i $INVENTORY localhost --connection=local | grep python +ansible -m setup -i $INVENTORY localhost --connection=local >> /dev/null +ansible-playbook -i $INVENTORY $PLAYBOOK ${ARGS} --connection=local echo -e "./iiab-install $* COMPLETED IN $CWD\n\n" diff --git a/iiab-network b/iiab-network index aabcc8578..0bef05005 100755 --- a/iiab-network +++ b/iiab-network @@ -25,8 +25,8 @@ fi echo "Ansible will now run iiab-network.yml -- log file is iiab-network.log" Start=`date` -ansible -m setup -i ansible_hosts localhost --connection=local -e ansible_python_interpreter=/usr/bin/python3 | grep python -ansible-playbook -i ansible_hosts iiab-network.yml --connection=local -e ansible_python_interpreter=/usr/bin/python3 +ansible -m setup -i ansible_hosts localhost --connection=local | grep python +ansible-playbook -i ansible_hosts iiab-network.yml --connection=local End=`date` diff --git a/iiab-support b/iiab-support index 8f229a51d..66c8e54ae 100755 --- a/iiab-support +++ b/iiab-support @@ -61,8 +61,8 @@ else #CWD=`pwd` #export ANSIBLE_LOG_PATH="$CWD/iiab-install.log" export ANSIBLE_LOG_PATH="/opt/iiab/iiab/iiab-install.log" - ansible -m setup -i $INVENTORY localhost --connection=local -e ansible_python_interpreter=/usr/bin/python3 | grep python - ansible-playbook -i $INVENTORY $PLAYBOOK --connection=local -e ansible_python_interpreter=/usr/bin/python3 + ansible -m setup -i $INVENTORY localhost --connection=local | grep python + ansible-playbook -i $INVENTORY $PLAYBOOK --connection=local # Above is tighter/better than running all of "./runrole 1-prep" echo else diff --git a/runrole b/runrole index 3e75c87bc..4cd853dc6 100755 --- a/runrole +++ b/runrole @@ -33,5 +33,6 @@ if [[ $# -eq 0 ]] ; then exit 0 fi -ansible -m setup -i $INVENTORY localhost --connection=local -e ansible_python_interpreter=/usr/bin/python3 | grep python -ansible-playbook -i $INVENTORY $PLAYBOOK ${ARGS} --connection=local -e "role_to_run=$1" -e ansible_python_interpreter=/usr/bin/python3 + +ansible -m setup -i $INVENTORY localhost ${ARGS} --connection=local | grep python +ansible-playbook -i $INVENTORY $PLAYBOOK ${ARGS} --connection=local -e "role_to_run=$1"