On 03/10/17 09:41, Sean wrote:
Hi,

I have a strange puppet error (v4.10.1) with a file resource that creates a cron job...

|
   file { '/etc/cron.daily/aide':
     ensure  => $mymodule::ensure_aide,
     owner   => 'root',
     group   => 'root',
     mode    => '0755',
     source  => 'puppet:///modules/mymodule/cron/daily-aide-check.sh',
     require => Package['aide'],
   }
|

The error is:

|
Error:Failedto apply catalog:Validationof File[/etc/cron.daily/aide]failed:Youcannot specify more than one of content,source,target at <source file>:line#


|

The ensure param is a Variant - either boolean or enum of true, false, present, absent, latest.  The code passes the puppet parser and checking puppet lookup for $mymodule::ensure_aide for the test node returns a 'true' value from the module's hiera data.

Any ideas?

Check that you do not have any defaults or overrides that sets one of the other attributes that also specifies the contents of the file.

Compile the catalog and inspect the contents of the resource in question. If the catalog contains conflicting information about the file contents, then the problem is most likely a default/override problem in your code. If the resource is what you shown (no conflict) then it looks like a possible bug on the agent side. If so, please file a ticket with a reproducible example.

Best,
- henrik


--
You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com <mailto:puppet-users+unsubscr...@googlegroups.com>. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/64776827-6fe1-49c0-89b1-fc532faa211a%40googlegroups.com <https://groups.google.com/d/msgid/puppet-users/64776827-6fe1-49c0-89b1-fc532faa211a%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.


--

Visit my Blog "Puppet on the Edge"
http://puppet-on-the-edge.blogspot.se/

--
You received this message because you are subscribed to the Google Groups "Puppet 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/or0kh8%24jod%241%40blaine.gmane.org.
For more options, visit https://groups.google.com/d/optout.

Reply via email to