aboutsummaryrefslogtreecommitdiffstats
path: root/modules/openssh
diff options
context:
space:
mode:
authorThomas Backlund <tmb@mageia.org>2019-09-16 12:31:00 +0300
committerThomas Backlund <tmb@mageia.org>2019-09-16 12:31:00 +0300
commitb3126521c2c023e14ab20a52063811021b658452 (patch)
treef454f82a8d077363f8c4dea152f78591e20c7ed7 /modules/openssh
parentf70d7c82601c1991b674d717039af8a415b1a5e4 (diff)
downloadpuppet-b3126521c2c023e14ab20a52063811021b658452.tar
puppet-b3126521c2c023e14ab20a52063811021b658452.tar.gz
puppet-b3126521c2c023e14ab20a52063811021b658452.tar.bz2
puppet-b3126521c2c023e14ab20a52063811021b658452.tar.xz
puppet-b3126521c2c023e14ab20a52063811021b658452.zip
fix up versioncmp issues
Diffstat (limited to 'modules/openssh')
-rw-r--r--modules/openssh/manifests/ssh_keys_from_ldap.pp7
1 files changed, 5 insertions, 2 deletions
diff --git a/modules/openssh/manifests/ssh_keys_from_ldap.pp b/modules/openssh/manifests/ssh_keys_from_ldap.pp
index e155ddf6..2e836026 100644
--- a/modules/openssh/manifests/ssh_keys_from_ldap.pp
+++ b/modules/openssh/manifests/ssh_keys_from_ldap.pp
@@ -8,14 +8,17 @@ if versioncmp($::lsbdistrelease, '7') < 0 {
$ldap_pwfile = '/etc/ldap.secret'
$nslcd_conf_file = '/etc/nslcd.conf'
$ldap_servers = get_ldap_servers()
+if versioncmp($::lsbdistrelease, '7') < 0 {
mga_common::local_script { 'ldap-sshkey2file.py':
content => template('openssh/ldap-sshkey2file.py'),
-if versioncmp($::lsbdistrelease, '7') < 0 {
require => Package['python2-ldap']
+ }
} else {
+ mga_common::local_script { 'ldap-sshkey2file.py':
+ content => template('openssh/ldap-sshkey2file.py'),
require => Package['python-ldap']
-}
}
+}
cron { 'sshkey2file':
command => '/bin/bash -c "/usr/local/bin/ldap-sshkey2file.py && ( [[ -f /usr/bin/mgagit && -d /var/lib/git/.gitolite ]] && /bin/su -c \'/usr/bin/mgagit glrun\' - git ) ||:"',