Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Class jenkins::slave : Rights issues on the jenkins-slave file with systemd #1088

Open
wywerne opened this issue Mar 1, 2024 · 0 comments
Open

Comments

@wywerne
Copy link

wywerne commented Mar 1, 2024

Hello

In the class, you have :
...
Boolean $manage_slave_user = true,
String $slave_user = 'jenkins-slave',
Optional[String] $slave_groups = undef,
...
case $facts['kernel'] {
'Linux': {
$service_name = 'jenkins-slave'
$defaults_user = 'root'
$defaults_group = 'root'

$manage_user_home = true

  $defaults_location = $facts['os']['family'] ? {
    'Archlinux' => '/etc/conf.d',
    'Debian'    => '/etc/default',
    default     => '/etc/sysconfig',
  }

  file { "${defaults_location}/jenkins-slave":
    ensure  => 'file',
    **mode    => '0600',**
    owner   => $defaults_user,
    group   => $defaults_group,

As the service starts with user "$slave_user", the file "jenkins-slave" is not readable for it.

It is possible to either change the file mode to "644", or "$defaults_user" = "$slave_user"

Regards,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant