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

Fails on FreeBSD because gid 0 is wheel, not root #86

Closed
Flupsy opened this issue Sep 22, 2020 · 1 comment · Fixed by #87
Closed

Fails on FreeBSD because gid 0 is wheel, not root #86

Flupsy opened this issue Sep 22, 2020 · 1 comment · Fixed by #87

Comments

@Flupsy
Copy link

Flupsy commented Sep 22, 2020

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 6.16.0
  • Ruby: 2.6.6p146
  • Distribution: FreeBSD 11.3
  • Module version: 2.0.0

How to reproduce (e.g Puppet code you use)

cron::job { 'duplicity-inc':
  minute => fqdn_rand(60),
  hour => fqdn_rand(4),
  weekday => '1,2,3,4,5,6',
  user => 'root',
  command => '/usr/local/scripts/run-backup-to-b2 inc',
}

What are you seeing

Error: Could not find group root
Info: Unknown failure using insync_values? on type: File[job_duplicity-inc] / property: group to compare values ["root"] and 0
Error: /Stage[main]/Duplicity/Cron::Job[duplicity-inc]/File[job_duplicity-inc]/group: change from 'wheel' to 'root' failed: Could not find group root

What behaviour did you expect instead

Successful run.

Any additional information you'd like to impart

FreeBSD gid 0 is wheel, not root.

@igalic
Copy link
Contributor

igalic commented Sep 23, 2020

easiest fix would be to change to this:

file { "job_${title}":
  ensure  => 'file',
  owner   => 0,
  group   => 0,
  mode    => $mode,
  path    => "/etc/cron.d/${title}",
  content => template('cron/job.erb'),
}

https://github.com/voxpupuli/puppet-cron/blob/master/manifests/job.pp

and everywhere else owner and group is set

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

Successfully merging a pull request may close this issue.

2 participants