Skip to content

Commit

Permalink
drop -e and just use ansible.cfg
Browse files Browse the repository at this point in the history
  • Loading branch information
jvonau committed Oct 31, 2019
1 parent dfd2547 commit aff014a
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 9 deletions.
2 changes: 2 additions & 0 deletions ansible.cfg
Expand Up @@ -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
6 changes: 3 additions & 3 deletions iiab-install
Expand Up @@ -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"
4 changes: 2 additions & 2 deletions iiab-network
Expand Up @@ -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`


Expand Down
4 changes: 2 additions & 2 deletions iiab-support
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions runrole
Expand Up @@ -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"

0 comments on commit aff014a

Please sign in to comment.