diff options
author | Craig Tracey <craigtracey@gmail.com> | 2012-12-13 21:06:32 -0500 |
---|---|---|
committer | Craig Tracey <craigtracey@gmail.com> | 2012-12-13 21:06:32 -0500 |
commit | 86301383a1f7ba99435c34a0157076aa7505599c (patch) | |
tree | a1639f965b0d2b2a8807184b871c54aeb789c6e3 | |
parent | 5c5041367a8630543d84a9edf9dd4321f0c69718 (diff) | |
download | vyos-cloud-init-86301383a1f7ba99435c34a0157076aa7505599c.tar.gz vyos-cloud-init-86301383a1f7ba99435c34a0157076aa7505599c.zip |
Provide a mechanism for puppet to be conditionally installed.
-rw-r--r-- | cloudinit/config/cc_puppet.py | 6 |
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: |