Hi,
On 18.06.2012, at 17:14, Wolf Noble wrote:
> Hi Jakov,
>
> the two semicolons locate these variables as being in top-scope/variables
> outside of any specific module.
please note that these are colons (:) no semicolons(;).
>
> otherwise it might be $modulename::variable
>
> Does that help at all?
>
> W
>
> On Jun 18, 2012, at 8:25 AM, Jakov Sosic wrote:
>
>> Hi.
>>
>> I have the following facts available:
>>
>> # facter | grep oper
>> operatingsystem => CentOS
>> operatingsystemrelease => 6.2
>>
>> Now, if I wish to use conditionals on these facts, I have to do it like
>> this:
>>
>> case $operatingsystem {}
>> case $::operatingsystemrelease {}
>>
>>
>> I'm puzzled as to why can't I just use $operatingsystemrelease, and what
>> do these two semicolons mean?
You could use $::operatingsystem only. But you want to be sure that you also
refer to CentOS.
I assume you want to net these two case conditionals:
case $::operatingsystem {
'CentOS': (
case $::operatingsystemrelease {
'5.0': {
...
}
'6.2': {
...
}
default: {
...
}
}
'Debian': {
...
}
default: {
...
}
}
Also take a look on the documentation:
http://docs.puppetlabs.com/guides/language_guide.html#conditionals
- Martin
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" 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-users?hl=en.