Minor fixes to get ansible to work on localhost

This commit is contained in:
Elijah Lazkani 2018-05-27 23:02:05 -04:00
parent 11264cf712
commit 9031b4fff0
3 changed files with 4 additions and 5 deletions

View file

@ -1,4 +1,4 @@
- hosts: local
- hosts: localhost
become: yes
roles:
- base

View file

@ -22,14 +22,14 @@ function _ansible () {
echo "Bootstrapping Ansible"
if [[ $playbook ]];
then
if [ ! -f inventory ];
if [ ! -f inventory.yml ];
then
echo "Inventory file not found"
touch inventory
exit 1
fi
echo "Sit down, relax and kick your legs up, fun is about to begin..."
ansible-playbook -i inventory Ansible/$playbook --ask-sudo-pass
ansible-playbook -i inventory.yml -c local Ansible/$playbook --ask-sudo-pass
else
echo "Choose a profile to run from the list below:"
find Ansible/ -maxdepth 1 -name "*.yml" -type f -printf " - %f\n"

View file

@ -1,2 +1 @@
ansible
python-dnf