diff --git a/files/auth/on_update_keydb.sh b/files/auth/on_update_keydb.sh deleted file mode 100644 index 3ed0354cff24082abb91955c6e78a5d67b01fa30..0000000000000000000000000000000000000000 --- a/files/auth/on_update_keydb.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -systemctl restart aes_auth_keydb.service -systemctl restart aes_temp_userdb.service diff --git a/manifests/auth_keydb.pp b/manifests/auth_keydb.pp index 5bde484935cd53ffe2e218a3ee094acc8d8b34a4..238a7b3d23ee17bd10ba6711d5a9e8df17b28d47 100644 --- a/manifests/auth_keydb.pp +++ b/manifests/auth_keydb.pp @@ -1,7 +1,8 @@ # @summary -# Describe what this class do! +# Key database for the communication module. # -# Detailed summary info if suitable +# Stores authentication keys (=SSH keys) for cases where Kerberos +# is not a suitable authentication method. # # class aes::auth_keydb { @@ -45,22 +46,14 @@ class aes::auth_keydb { source => "puppet:///modules/${module_name}/auth/keydb.service", } - file { "${keydb_home}/on_update.sh" : - ensure => file, - owner => root, - group => root, - mode => '0700', - source => "puppet:///modules/${module_name}/auth/on_update_keydb.sh", - } - - exec { 'update-keydb-repo' : - command => "/opt/utils/update_repo.sh ${keydb_home}/src https://oauth2:F-agHaRXCdyFy38q4c-N@gitlab.liu.se/upp-aes/communication.git ${server_type}", - environment => ["REPO_USER=${keydb_user}", "REPO_GROUP=${keydb_group}", "REPO_ON_UPDATE=${keydb_home}/on_update.sh"], - # This command will need to run "on_update" as root in order to restart the service. - user => root, - group => root, - cwd => $keydb_home, - require => File["${keydb_home}/on_update.sh"], + vcsrepo { "${keydb_home}/src": + ensure => latest, + provider => git, + source => 'https://oauth2:F-agHaRXCdyFy38q4c-N@gitlab.liu.se/upp-aes/communication.git', + revision => $server_type, + owner => $keydb_user, + group => $keydb_group, + notify => [Service[$keydb_service], Service['aes_temp_userdb']], } service { $keydb_service :