Merge lp:~michael.nelson/charms/trusty/conn-check/optional-ppa into lp:~ubuntuone-hackers/charms/trusty/conn-check/trunk

Proposed by Michael Nelson
Status: Merged
Approved by: Michael Nelson
Approved revision: 38
Merged at revision: 37
Proposed branch: lp:~michael.nelson/charms/trusty/conn-check/optional-ppa
Merge into: lp:~ubuntuone-hackers/charms/trusty/conn-check/trunk
Diff against target: 38 lines (+12/-1)
2 files modified
config.yaml (+7/-0)
hooks/hooks.py (+5/-1)
To merge this branch: bzr merge lp:~michael.nelson/charms/trusty/conn-check/optional-ppa
Reviewer Review Type Date Requested Status
Kelvin Li (community) Approve
Review via email: mp+259871@code.launchpad.net

Commit message

Add install_ansible_from_ppa config option, defaulting to true for current behaviour, but allowing users to opt out of adding a PPA to their units.

Description of the change

Tested on an internal deployment.

To post a comment you must log in.
Revision history for this message
Kelvin Li (kelvin.li) wrote :

LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'config.yaml'
--- config.yaml 2014-11-14 10:30:58 +0000
+++ config.yaml 2015-05-22 03:24:07 +0000
@@ -7,3 +7,10 @@
7 type: string7 type: string
8 default: ""8 default: ""
9 description: "Extra command line arguments to pass to conn-check."9 description: "Extra command line arguments to pass to conn-check."
10 install_ansible_from_ppa:
11 type: boolean
12 default: true
13 description: |
14 Indicates whether ansible should be installed via the ppa. If this
15 is set to false you must ensure a compatable version of ansible
16 is installable via the configured apt repositories.
1017
=== modified file 'hooks/hooks.py'
--- hooks/hooks.py 2015-03-06 17:01:23 +0000
+++ hooks/hooks.py 2015-05-22 03:24:07 +0000
@@ -2,6 +2,8 @@
2import sys2import sys
3import charmhelpers.contrib.ansible3import charmhelpers.contrib.ansible
4import charmhelpers.payload.execd4import charmhelpers.payload.execd
5import charmhelpers.core.hookenv
6
57
6hooks = charmhelpers.contrib.ansible.AnsibleHooks(8hooks = charmhelpers.contrib.ansible.AnsibleHooks(
7 playbook_path='playbook.yaml',9 playbook_path='playbook.yaml',
@@ -22,7 +24,9 @@
22 executed.24 executed.
23 """25 """
24 charmhelpers.payload.execd.execd_preinstall()26 charmhelpers.payload.execd.execd_preinstall()
25 charmhelpers.contrib.ansible.install_ansible_support(from_ppa=True)27 config = charmhelpers.core.hookenv.config()
28 charmhelpers.contrib.ansible.install_ansible_support(
29 from_ppa=config['install_ansible_from_ppa'])
2630
2731
28@hooks.action()32@hooks.action()

Subscribers

People subscribed via source and target branches