|
Gary Larizza |
at Feb 9, 2013 at 1:38 am
|
⇧ |
| |
The reason this is happening is because you're not testing the presence of
that folder, you're actually testing whether the variable $confdir == the
string of 'True', which it does not (it holds the value of the string
"C:/windows")
What ultimately are you looking to do here? Puppet is a declarative
language that works by specifying the end-state of your node. If you want
C:\Windows to exist, and C:\folder_present.txt to exist, then you have to
declare them and let Puppet ensure their presence.
On Fri, Feb 8, 2013 at 8:22 AM, jim wrote:Hello
Can someone please help or explain why this isn't working
as read
http://docs.puppetlabs.com/guides/language_guide.htmlIt keeps adding the file NOT_present.txt
i've played around with == and != and True / false etc, and its not giving
me the correct outcome telling if folder exists or not
$confdir = 'C:/windows'
if $confdir == 'True' {
file { 'C:/folder_present.txt': ensure => present }
} else {
file { 'C:/NOT_present.txt': ensure => present }
}
regards
james
--
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+unsubscribe@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at
http://groups.google.com/group/puppet-users?hl=en.For more options, visit
https://groups.google.com/groups/opt_out. --
Gary Larizza
Professional Services Engineer
--
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+unsubscribe@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at
http://groups.google.com/group/puppet-users?hl=en.For more options, visit
https://groups.google.com/groups/opt_out.