Override hosts: in any playbook via command-line argument
131 views
Skip to first unread message
Alex Leonhardt
unread,
Aug 3, 2015, 11:52:48 AM8/3/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Ansible Project
Hi,
How can I override the hosts: definition in any playbook ? I've got some playbooks that run against remote hosts, which I want to keep in the playbook, but need to be able to run /test it against "localhost" as well ... I guess adding localhost would be an option, but I dont want it to run against the other hosts in that case - I found in some forums to use a --extra-vars "target=host" and use - hosts: "{{ target }}" but that would mean I have to update all my playbooks and how I'd run them ...