summaryrefslogtreecommitdiff
path: root/cloudinit/config
diff options
context:
space:
mode:
authorCraig Tracey <craigtracey@gmail.com>2012-12-14 09:11:29 -0500
committerScott Moser <smoser@ubuntu.com>2012-12-14 09:11:29 -0500
commit2235c05d8dbdd67d026b7219884c3d2e6936d67a (patch)
tree01122c8d1c6059b2415cd783bbe3c0e24c615008 /cloudinit/config
parent5c5041367a8630543d84a9edf9dd4321f0c69718 (diff)
parent86301383a1f7ba99435c34a0157076aa7505599c (diff)
downloadvyos-cloud-init-2235c05d8dbdd67d026b7219884c3d2e6936d67a.tar.gz
vyos-cloud-init-2235c05d8dbdd67d026b7219884c3d2e6936d67a.zip
Provide a mechanism for puppet to be conditionally installed.
Instead of always installing puppet give users the ability to opt-out. LP: #1090205
Diffstat (limited to 'cloudinit/config')
-rw-r--r--cloudinit/config/cc_puppet.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/cloudinit/config/cc_puppet.py b/cloudinit/config/cc_puppet.py
index 8fe3af57..e9a0a0f4 100644
--- a/cloudinit/config/cc_puppet.py
+++ b/cloudinit/config/cc_puppet.py
@@ -57,8 +57,10 @@ def handle(name, cfg, cloud, log, _args):
puppet_cfg = cfg['puppet']
- # Start by installing the puppet package ...
- cloud.distro.install_packages(["puppet"])
+ # Start by installing the puppet package if necessary...
+ install = util.get_cfg_option_bool(puppet_cfg, 'install', True)
+ if install:
+ cloud.distro.install_packages(["puppet"])
# ... and then update the puppet configuration
if 'conf' in puppet_cfg: