Issue #4131 has been updated by Markus Roberts. Subject changed from host moves resources from default file to target ( I assume this applies to all parsedfiles) to host quietly moves resources from default file to target ( I assume this applies to all parsedfiles) Priority changed from High to Normal Target version set to queued Affected version changed from 2.6alpha1 to 0.24.8
It turns out this is by design. Since resources must be globally unique by name, there can be only one; adding a resource to a target perforce removes it from another. This has use cases (moving a cron job from one users contab to another). Where it appears to be a misfeature it may be better to give the type a composite name var including the target. ---------------------------------------- Bug #4131: host quietly moves resources from default file to target ( I assume this applies to all parsedfiles) http://projects.puppetlabs.com/issues/4131 Author: Dan Bode Status: Accepted Priority: Normal Assigned to: Markus Roberts Category: Target version: queued Affected version: 0.24.8 Keywords: Branch: use the host resource and puppet resource: I expect the following to fail: <pre> # puppet resource host test1 ensure=present target="/tmp/host" host_aliases=alias1 notice: /Host[test1]/ensure: created err: /Host[test1]: Could not evaluate: ip is a required attribute for hosts host { 'test1': host_aliases => ['alias1'], target => '/tmp/host', ensure => 'present' } </pre> If there is already an entry for this host in /etc/hosts (the default target), puppet will use the ip address of that host and move it to the new target location. <pre> # echo '127.0.0.2 test1'> /etc/hosts [r...@puppet2 puppet_spec]# puppet resource host test1 ensure=present target="/tmp/host" host_aliases=alias1 notice: /Host[test1]/host_aliases: host_aliases changed '' to 'alias1' notice: /Host[test1]/target: target changed '/etc/hosts' to '/tmp/host' host { 'test1': host_aliases => ['alias1'], target => '/tmp/host', ensure => 'present' } </pre> -- 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.
