Issue #1848 has been updated by micah.

Status changed from Accepted to Rejected

It turns out that I was just doing this wrong. As my good friend Pietro told 
me, surrounding the array with single quotes is wrong. Because if you put it 
between single quotes it is treated a string, instead it should be:

<pre>
environment => ['TMPDIR=/var/tmp', 'TMP=/var/tmp'],
</pre>

Thanks pietro!
----------------------------------------
Feature #1848: support multi-line cron environment variables
http://projects.reductivelabs.com/issues/show/1848

Author: micah
Status: Rejected
Priority: Low
Assigned to: community
Category: cron
Target version: unplanned
Complexity: Unknown
Affected version: 0.24.7
Keywords: 


It seemed to be within the puppet way of doing things to try and specify two 
cron environment variables, that I expected to be on multiple lines as follows:

<pre>
cron { 
    "sa-update_openprotect":
      command => "sa-update --gpgkeyfile /etc/spamassassin/sa-update_gpgkeys 
--channelfile /etc/spamassassin/sa-update_channels && sa-compile &>/dev/null && 
/etc/init.d/spamassassin restart &>/dev/null",
      environment => '["TMPDIR=/var/tmp", "TMP=/var/tmp"]',
      user    => root,
      hour    => 2,
      minute  => 0;
}
</pre>

But that doesn't work, instead you need to do something not as intuitive:

<pre>
      environment => "TMPDIR=/var/tmp\nTMP=/var/tmp",
</pre>

Would be cool if puppet crontypes supported the other way of doing this, as 
this seemed like the cleaner, "puppet" way of doing it.


----------------------------------------
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://reductivelabs.com/redmine/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
-~----------~----~----~----~------~----~------~--~---

Reply via email to