Issue #4978 has been reported by Chris Ferry.
----------------------------------------
Bug #4978: If directory exists puppet doesn't respect the require
http://projects.puppetlabs.com/issues/4978
Author: Chris Ferry
Status: Unreviewed
Priority: Normal
Assignee:
Category: file
Target version:
Affected version:
Keywords:
Branch:
I thought this was an order dependency issue, but that doesn't seem to be the
case
basenode:
node 'mgmt' {
include yum_slave
include user_roles
include base
}
user_roles:
if ( defined( Class["yum-server"] ) or defined( Class["yum-slave"] ) ) {
# Repo-Syncer
group { "repo-syncer":
ensure => present,
gid => "804" ,
}
user { "repo-syncer" :
uid => "804",
gid => "804",
home => "/home/repo-syncer",
require => Group [ "repo-syncer" ],
}
}
yum_slave:
class yum-slave {
file { "/mnt/repo/":
ensure => directory,
mode => "755",
owner => repo-syncer,
group => repo-syncer,
require => User["repo-syncer"],
}
#Cron task
cron { "sync-centos-repo":
command => "/bin/nice /usr/bin/rsync -qalH --delete
10.244.1.1:/mnt/repo/centos /mnt/repo/",
user => repo-syncer,
hour => '4',
minute => 1,
require => User["repo-syncer"],
}
}
/mnt/repo exists. When run with the above config:
err: Could not run Puppet configuration client: Could not find user repo-syncer
When I comment out only the file resource, but leave the cron, there's no
problem.
So it's not a dependency issue caused by the define. It looks like the file
resource ignores the "require => User["repo-syncer"]" because /mnt/repo already
exists.
--
You have received this notification because you have either subscribed to it,
or are involved in it.
To change your notification preferences, please click here:
http://projects.puppetlabs.com/my/account
--
You received this message because you are subscribed to the Google Groups
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-bugs?hl=en.