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 is contained in:
commit
20ee6fa19e
@ -142,6 +142,7 @@ hiera_include:
|
|||||||
- timezone
|
- timezone
|
||||||
- networking
|
- networking
|
||||||
- ssh::server
|
- ssh::server
|
||||||
|
- profiles::accounts::rundeck
|
||||||
|
|
||||||
profiles::ntp::client::ntp_role: 'roles::infra::ntp::server'
|
profiles::ntp::client::ntp_role: 'roles::infra::ntp::server'
|
||||||
profiles::ntp::client::use_ntp: 'region'
|
profiles::ntp::client::use_ntp: 'region'
|
||||||
@ -305,6 +306,8 @@ sudo::configs:
|
|||||||
|
|
||||||
profiles::accounts::sysadmin::sshkeys:
|
profiles::accounts::sysadmin::sshkeys:
|
||||||
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDZ8SRLlPiDylBpdWR9LpvPg4fDVD+DZst4yRPFwMMhta4mnB1H9XuvZkptDhXywWQ7QIcqa2WbhCen0OQJCtwn3s7EYtacmF5MxmwBYocPoK2AArGuh6NA9rwTdLrPdzhZ+gwe88PAzRLNzjm0ZBR+mA9saMbPJdqpKp0AWeAM8QofRQAWuCzQg9i0Pn1KDMvVDRHCZof4pVlHSTyHNektq4ifovn0zhKC8jD/cYu95mc5ftBbORexpGiQWwQ3HZw1IBe0ZETB1qPIPwsoJpt3suvMrL6T2//fcIIUE3TcyJKb/yhztja4TZs5jT8370G/vhlT70He0YPxqHub8ZfBv0khlkY93VBWYpNGJwM1fVqlw7XbfBNdOuJivJac8eW317ZdiDnKkBTxapThpPG3et9ib1HoPGKRsd/fICzNz16h2R3tddSdihTFL+bmTCa6Lo+5t5uRuFjQvhSLSgO2/gRAprc3scYOB4pY/lxOFfq3pU2VvSJtRgLNEYMUYKk= ben@unkin.net
|
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDZ8SRLlPiDylBpdWR9LpvPg4fDVD+DZst4yRPFwMMhta4m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FK82KVDuQ99vQ6w4X73IESKoLzyAVxpelwHaDG4fN+zqYfqubVQU1L5cUeYKxqm5r3Us6VvMaYs1ZMUmDGXHOq4FNhGUJYxSjkLvunM6qyAAJQCd6Pw/2TV3UQVerbouGOZaeBLvRguHWSbDrO99Zu+t87w== rundeck_runner
|
||||||
|
|
||||||
networking::interface_defaults:
|
networking::interface_defaults:
|
||||||
ensure: present
|
ensure: present
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@ -3,6 +3,9 @@ hiera_include:
|
|||||||
- profiles::rundeck::server
|
- profiles::rundeck::server
|
||||||
- profiles::nginx::simpleproxy
|
- profiles::nginx::simpleproxy
|
||||||
|
|
||||||
|
hiera_exclude:
|
||||||
|
- profiles::accounts::rundeck
|
||||||
|
|
||||||
profiles::packages::exclude:
|
profiles::packages::exclude:
|
||||||
- jq
|
- jq
|
||||||
|
|
||||||
|
|||||||
14
site/profiles/manifests/accounts/rundeck.pp
Normal file
14
site/profiles/manifests/accounts/rundeck.pp
Normal file
@ -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,
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -86,4 +86,20 @@ class profiles::rundeck::server (
|
|||||||
|
|
||||||
create_resources('rundeck::config::aclpolicyfile', $acl_policies)
|
create_resources('rundeck::config::aclpolicyfile', $acl_policies)
|
||||||
create_resources('rundeck::config::project', $cli_projects)
|
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'),
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user