diff options
author | LeLutin <gabster@lelutin.ca> | 2015-10-09 17:38:34 +0000 |
---|---|---|
committer | LeLutin <gabster@lelutin.ca> | 2015-10-09 17:38:34 +0000 |
commit | c8e33769c8a9923354576a226a8bf889cfc87cb9 (patch) | |
tree | 19ed7905556c64ece3cb93649bdc0919921efff8 /manifests/managed.pp | |
parent | 885f52f2d833e26632f7aa37fa3a829adfc79baa (diff) | |
parent | 7efadcb05d63249b0f9e4918238ab687accf175d (diff) |
Fix user::managed for earlier (<3.6) puppet agents
See merge request !1
Diffstat (limited to 'manifests/managed.pp')
-rw-r--r-- | manifests/managed.pp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/manifests/managed.pp b/manifests/managed.pp index 0b0d677..a0806e7 100644 --- a/manifests/managed.pp +++ b/manifests/managed.pp @@ -78,9 +78,18 @@ define user::managed( shell => $real_shell, groups => $groups, membership => $membership, - purge_ssh_keys => $purge_ssh_keys, } + if $purge_ssh_keys { + if versioncmp($::puppetversion, '3.6') >= 0 { + User[$name] { + purge_ssh_keys => true + } + } + else { + notice("Parameter purge_ssh_keys is unsupported in your Puppet agent!") + } + } if $managehome { file{$real_homedir: } |