Re: [Puppet Users] Why IF-ELSE not work?

2013-02-14 Thread Brian Lalor
Import is like a #include in C: it's essentially a preprocessor directive and is evaluated before the if/ else. http://docs.puppetlabs.com/puppet/2.7/reference/lang_import.html -- Brian Lalor bla...@bravo5.org On Feb 14, 2013, at 1:17 AM, Евгений Верещагин e.verescha...@gmail.com wrote: I

Re: [Puppet Users] Why IF-ELSE not work?

2013-02-14 Thread Felix Frank
Hi, import is largely deprecated for most uses. I haven't really used it after Puppet 0.25. What I learned back then was that the parser would honor all import statements it would find. I believe that the if statements cannot be validated until after the parsing stage, so they won't hinder

Re: [Puppet Users] Why IF-ELSE not work?

2013-02-14 Thread jcbollinger
On Thursday, February 14, 2013 5:55:35 AM UTC-6, blalor wrote: Import is like a #include in C: it's essentially a preprocessor directive and is evaluated before the if/ else. http://docs.puppetlabs.com/puppet/2.7/reference/lang_import.html But also, as I just remarked in another

Re: [Puppet Users] Why IF-ELSE not work?

2013-02-14 Thread Евгений Верещагин
I want call diffrent manifest files for diffrent rules and systems. I think that write all rules in one file is not good idea :-) четверг, 14 февраля 2013 г., 18:41:33 UTC+4 пользователь jcbollinger написал: On Thursday, February 14, 2013 5:55:35 AM UTC-6, blalor wrote: Import is like a

Re: [Puppet Users] Why IF-ELSE not work?

2013-02-14 Thread jcbollinger
On Thursday, February 14, 2013 11:31:54 AM UTC-6, Евгений Верещагин wrote: I want call diffrent manifest files for diffrent rules and systems. I think that write all rules in one file is not good idea :-) No one suggested that you should put everything on one file. Nevertheless, you

[Puppet Users] Why IF-ELSE not work?

2013-02-13 Thread Евгений Верещагин
I try include different .pp for my systems. site.pp like: if $operatingsystem == 'debian' { import '../my/os/linux/debian.pp' } elsif $operatingsystem == 'windows' { import '../my/os/windows/windows.pp' } else { import '../my/os/default/default.pp' } and I try CASE: case $operatingsystem