Option to make "No hosts matched" a FATAL error?

57 views
Skip to first unread message

Marc Abramowitz

unread,
Jun 22, 2015, 6:05:04 PM6/22/15
to ansible...@googlegroups.com

Hi all is there a way to make it so that "No hosts matched" becomes a FATAL error?


I'm using a CI job to kick off ansible to deploy something and in this case if it cannot find a host to deploy to, I want that to be a fatal error. Right now, ansible returns a zero exit code so the CI job succeeds and then people ask my why the job succeeded but the new code wasn't deployed.


Marc

Marc Abramowitz

unread,
Jun 22, 2015, 6:41:52 PM6/22/15
to ansible...@googlegroups.com

Brian Coca

unread,
Jun 26, 2015, 12:11:55 AM6/26/15
to ansible...@googlegroups.com
lets make this a configuration option, this used to be the case and
many people asked for it to change into a warning, as default
localhost entry meant you always have an inventory.


--
Brian Coca

Brian Coca

unread,
Jun 26, 2015, 12:13:43 AM6/26/15
to ansible...@googlegroups.com
scratch that ... this is different, i was referring to empty
inventories, this is about plays not matching any host.




--
Brian Coca
Reply all
Reply to author
Forward
0 new messages