Skip to content
Snippets Groups Projects
Commit ad96de01 authored by Filip Strömbäck's avatar Filip Strömbäck
Browse files

Updated the keydb to use vcsrepo as well.

parent 06f322f1
No related branches found
No related tags found
2 merge requests!50Fix: Puppet Defining "data_provider": "hiera" in metadata.json is deprecated....,!40Merge from devel. Commits related to RHEL9 upgrade and pdk cleanup.
Pipeline #101951 passed
#!/bin/bash
systemctl restart aes_auth_keydb.service
systemctl restart aes_temp_userdb.service
# @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 :
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment