diff options
author | Vlastimil Holer <vlastimil.holer@gmail.com> | 2013-02-19 16:30:06 +0100 |
---|---|---|
committer | Vlastimil Holer <vlastimil.holer@gmail.com> | 2013-02-19 16:30:06 +0100 |
commit | 6b0652745129808dc0669354cb3e0dc53962d6ea (patch) | |
tree | 6ec307c7c245cf68d28ef05e3f1a9f7d075ff8bc /cloudinit/config/cc_puppet.py | |
parent | e18f0f8a382729cc7c9f8df3ad0573af7eeb8f47 (diff) | |
parent | 174bc39e6b2c1cac3f73f67f25fad87cab16fa42 (diff) | |
download | vyos-cloud-init-6b0652745129808dc0669354cb3e0dc53962d6ea.tar.gz vyos-cloud-init-6b0652745129808dc0669354cb3e0dc53962d6ea.zip |
Merged trunk lp:cloud-init
Diffstat (limited to 'cloudinit/config/cc_puppet.py')
-rw-r--r-- | cloudinit/config/cc_puppet.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/cloudinit/config/cc_puppet.py b/cloudinit/config/cc_puppet.py index e9a0a0f4..471a1a8a 100644 --- a/cloudinit/config/cc_puppet.py +++ b/cloudinit/config/cc_puppet.py @@ -59,8 +59,14 @@ def handle(name, cfg, cloud, log, _args): # 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"]) + version = util.get_cfg_option_str(puppet_cfg, 'version', None) + if not install and version: + log.warn(("Puppet install set false but version supplied," + " doing nothing.")) + elif install: + log.debug(("Attempting to install puppet %s,"), + version if version else 'latest') + cloud.distro.install_packages(('puppet', version)) # ... and then update the puppet configuration if 'conf' in puppet_cfg: |