Issue #8768 has been updated by wes johnson.
Please close this request. Else block contains conflicting 'source' and 'content' elements. Derp. ---------------------------------------- Bug #8768: Puppet doesn't allow multiples of 'content' or 'source' when conditionals prevent ambiguous overload https://projects.puppetlabs.com/issues/8768 Author: wes johnson Status: Unreviewed Priority: Normal Assignee: Category: Target version: Affected Puppet version: 0.25.4 Keywords: content, source, conditional Branch: Puppet won't allow multiple definitions for content, source, target, but the given example prevents improper use that the error prevents. The example code is a conditional that will source a configuration file, or a parameterized template of the configuration file depending on the value of a variable: Partial Index: ~/workspace/puppet/modules/varnish/manifests/init.pp <pre> #################### class varnish { package { varnish: ensure => latest } service { varnish: ensure => running, enable => true, require => Package["varnish"], } if $varnish_backend_port == '' { file { "/etc/varnish/ib.vcl": owner => varnish, group => varnish, mode => 644, source => "puppet:///modules/varnish/ib.vcl", require => Package["varnish"], notify => Service["varnish"], } } else { file { "/etc/varnish/ib.vcl": content => template("/etc/puppet/modules/varnish/templates/ib.vcl"), owner => varnish, group => varnish, mode => 644, source => "puppet:///modules/varnish/ib.vcl", require => Package["varnish"], notify => Service["varnish"], } } <snip> </pre> This produces the following error: <pre> [wejohnson@host ~]$ /usr/bin/puppet --version 0.25.4 [wejohnson@host ~]$ sudo /usr/sbin/puppetd --test info: Retrieving plugin info: Loading facts in rpm_version info: Loading facts in is_citrix info: Loading facts in rpm_version info: Loading facts in is_citrix info: Caching catalog for host.domain.com err: Could not run Puppet configuration client: You cannot specify more than one of content, source, target at /etc/puppet/modules/varnish/manifests/init.pp:28 </pre> Expected result is that 'source' and 'content' will not actually conflict with each other given the flow of this if statement. -- 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.
