Issue #16971 has been updated by Julien Vaubourg. Status changed from Closed to Re-opened Assignee changed from Julien Vaubourg to eric sorenson
Thanks for your interest. **Henrik:** I tried your solution, but I have the same problem. Package { require => File['/etc/apt/apt.conf.d/no-cache'], } package { 'php5-cli': ensure => present, } Package[ 'php5-cli' ] { require => Package['php5-cgi'], } Result: # puppet agent -t --noop -d | grep -i blog debug: /Stage[main]/Blog/Package[php5-cli]/require: requires Package[php5-cgi] And without the "*Package[ 'php5-cli' ]*" definition: # puppet agent -t --noop -d | grep -i blog debug: /Stage[main]/Blog/Package[php5-cli]/require: requires File[/etc/apt/apt.conf.d/no-cache] So, if I need to add a require to a package, I lose the default requires :(. **Eric:** If the the plusignment is authorized in the default section instead the specific resource, my issue could be solved. However, it does not seem to work either: Package { require +> File['/etc/apt/apt.conf.d/no-cache'], } package { 'php5-cli': ensure => present, require => Package['php5-cgi'], } Error: err: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not parse for environment production: Syntax error at '+>'; expected '}' at /etc/puppet/manifests/site.pp:2 on node xxxxx warning: Not using cache on failed catalog err: Could not retrieve catalog; skipping run ---------------------------------------- Bug #16971: Add values to default resources with the plusignment https://projects.puppetlabs.com/issues/16971#change-77863 Author: Julien Vaubourg Status: Re-opened Priority: Low Assignee: eric sorenson Category: language Target version: Affected Puppet version: Keywords: Branch: # Example # Directly in site.pp: Package { require => File['/etc/apt/apt.conf.d/no-cache'], } In the "blog" class: package { 'php5-cli': ensure => present, require => Package['php5-cgi'], } On the agent side, with the "*require => Package['php5-cgi']*" line: # puppet agent -t --noop -d | grep no-cache | grep -i blog # Without it: # puppet agent -t --noop -d | grep no-cache | grep -i blog debug: /Stage[main]/Blog/Package[php5-cli]/require: requires File[/etc/apt/apt.conf.d/no-cache] # And with "*require +> Package['php5-cgi']*": # puppet agent -t --noop -d | grep no-cache | grep -i blog err: Could not retrieve catalog from remote server: Error 400 on SERVER: Syntax error at '+>'; expected '}' at /etc/puppet/modules/blog/manifests/init.pp:5 on node xxxxx warning: Not using cache on failed catalog err: Could not retrieve catalog; skipping run # Problem # According to this example: 1. Define a resource set before as a default resource overwrite it. 1. The usage of the plusignment ("*+>*") operator is not recognized in this case. How add values to default resources? The plusignment should work in this case. -- 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 puppet-bugs@googlegroups.com. To unsubscribe from this group, send email to puppet-bugs+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-bugs?hl=en.