Minor fixes to get ansible to work on localhost
This commit is contained in:
parent
11264cf712
commit
9031b4fff0
3 changed files with 4 additions and 5 deletions
|
@ -1,4 +1,4 @@
|
|||
- hosts: local
|
||||
- hosts: localhost
|
||||
become: yes
|
||||
roles:
|
||||
- base
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -1,2 +1 @@
|
|||
ansible
|
||||
python-dnf
|
||||
|
|
Loading…
Reference in a new issue