Hi everyone,
We use Jenkins to call ansible-playbook, usually the command would look like the following:
ansible-playbook -i targets deploy_portal.yml -e 'hosts=portal_dev,portal_dev2 version=1.0.35' -vvvv
It would go into the inventory file of hosts (-i targets) find the portal_dev,portal_dev2 tags and deploy to those servers only.
Recently we had a configuration error in Jenkins and the playbook call did the following:
ansible-playbook -i targets deploy_portal.yml -e 'hosts=, version=1.0.35' -vvvv
After reading through the documentation it looks like the hosts=, defaults to ,* which essentially went out to our inventory targets file and played on all servers defined in that file.
Is this normal behavior? I've tried putting hosts = pleasetryagain in the ansible.cfg so it doesn't default to * but I think the comma in the environment variables overrides it and it continues
to play on all servers.
Any help would be greatly appreciated.
Thanks,
Stacey