Merge lp://qastaging/~michael.nelson/charm-helpers/ansible-support into lp://qastaging/charm-helpers
Status: | Merged |
---|---|
Merged at revision: | 65 |
Proposed branch: | lp://qastaging/~michael.nelson/charm-helpers/ansible-support |
Merge into: | lp://qastaging/charm-helpers |
Prerequisite: | lp://qastaging/~michael.nelson/charm-helpers/namespace-relation-data |
Diff against target: |
545 lines (+346/-62) 7 files modified
charmhelpers/contrib/ansible/__init__.py (+101/-0) charmhelpers/contrib/saltstack/__init__.py (+17/-14) charmhelpers/fetch/__init__.py (+1/-1) setup.py (+1/-0) tests/contrib/ansible/test_ansible.py (+136/-0) tests/contrib/saltstack/test_saltstates.py (+87/-46) tests/fetch/test_fetch.py (+3/-1) |
To merge this branch: | bzr merge lp://qastaging/~michael.nelson/charm-helpers/ansible-support |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Matthew Wedgwood (community) | Approve | ||
Review via email:
|
Commit message
Add support for using ansible within charms.
Description of the change
Adds ansible support to charm-helpers.
I've converted a (private - sorry) charm to test out this support [1] - all works fine.
The juju config data, as well as any relation data is available to the ansible playbooks and templates using standard jinja2 syntax: {{ instance_type }}, where relation data is namespaced by the relation type, using django-like syntax: {{ solr__hostname }}.
One question I have is whether there's a better place for the juju_state_
Hey, Michael,
This looks awesome, thanks! I can't wait to try it out.
Regarding juju_state_ to_yaml( ), I'd say it belongs in core.hookenv. Bonus points for including a larger chunk of execution_ environment( ).
-Matthew