Hi!

Just a heads-up that I'm thinking of adding a --list-tags option to 
ansible-playbook. Let me know if there's a reason why that wouldn't be a 
good idea, or it's not needed etc.

My use-case is that I'd like to know in advance whether a tag is included 
in the playbook, rather than running the playbook and erroring. I can 
currently work around this by parsing the error output of `ansible-playbook 
--tags random-hash myplaybook`, but I'd like a nicer way :)

More background for anyone interested:

I'm using ansible to make writing juju-charms [1] much more fun. juju has a 
number of lifecycle hooks that are run as a service relates to other 
services (eg., an app server to a database backend). These hooks can be 
written in anything you like, but we've created some helpers so that when a 
specific hook is called, it just results in a local ansible playbook being 
run using the --tags hook-name . So all the state can be declared with all 
the goodness of playbooks and/or roles, rather than bash scripts or python 
code.

Currently as a charm author, you need to register the ansible-supported 
hook names by default [2], but I'd like to make that transparent.

Any feedback welcome, I'll get started on a pull-request if I don't hear 
back.
Thanks

[1] https://juju.ubuntu.com/charms/
[2] eg 
https://github.com/absoludity/charm-bootstrap-ansible/blob/master/hooks/hooks.py
[3] http://micknelson.wordpress.com/2013/11/08/juju-ansible-simpler-charms/

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/613b8a36-bc79-4d33-b7a8-2c990c0f912f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to