Merge pull request 'feat: add rundeck runner user' (#130) from neoloc/rundeck_user into develop

Reviewed-on: https://git.query.consul/unkinben/puppet-prod/pulls/130
This commit was merged in pull request #130.
This commit is contained in:
2024-08-06 22:36:54 +10:00
5 changed files with 37 additions and 0 deletions
@@ -0,0 +1,14 @@
# create the rundeck user
class profiles::accounts::rundeck (
Array[String] $sshkeys = [],
){
profiles::base::account {'rundeck':
username => 'rundeck',
uid => 1100,
gid => 1100,
groups => ['adm', 'admins', 'systemd-journal'],
sshkeys => $sshkeys,
require => Group['admins'],
system => true,
}
}
+16
View File
@@ -86,4 +86,20 @@ class profiles::rundeck::server (
create_resources('rundeck::config::aclpolicyfile', $acl_policies)
create_resources('rundeck::config::project', $cli_projects)
# create rundeck runner ssh key
file {'/var/lib/rundeck/.ssh/rundeck_id_rsa':
ensure => 'file',
owner => 'rundeck',
group => 'rundeck',
mode => '0600',
content => lookup('rundeck::ssh::private_key'),
}
file {'/var/lib/rundeck/.ssh/rundeck_id_rsa.pub':
ensure => 'file',
owner => 'rundeck',
group => 'rundeck',
mode => '0644',
content => lookup('profiles::accounts::rundeck::sshkeys'),
}
}