help-cfengine
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: conditional import for other than hostname?


From: Predrag Zecevic - Solaris System Administrator
Subject: Re: conditional import for other than hostname?
Date: Tue, 01 Jun 2004 09:37:49 +0200
User-agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:1.7) Gecko/20040518

Hi,

for me works also:
--------------------------------------- <conf> ---
import:
  solaris::
     solaris.classes.conf
     solaris.main.conf
     solaris.openssh.conf
     solaris.oracle.conf
     solaris.crontab.conf
     solaris.bind.conf
     solaris.apache.conf
     solaris.postfix.conf
     solaris.users.conf
     solaris.bigbrother.conf
     solaris.motd.conf

  solaris.sunos_5_8::
     sunos_5_8.specific.conf

  solaris.sunos_5_9::
     sunos_5_9.specific.conf

  linux::
     linux.classes.conf
     linux.main.conf
     linux.crontab.conf
     linux.motd.conf
--------------------------------------- </conf> ---
Regards ;-)

Brendan Strejcek wrote:

This works fine for me, for example:

import:

   debian_2_0::             debian_2_0
   debian_3_0::             debian_3_0
   debian_testing::         debian_testing
   debian_unstable::        debian_unstable
   openbsd_3_4::            openbsd_3_4
   openbsd_3_5::            openbsd_3_5
   darwin_power_macintosh:: mac_10_3

Your /bin/cp shell command seems a little wonky. Why not use a copy:
section?

Steve Wray wrote:

I note that in the reference guide it says;

"import

To break up a large configuration file into smaller files you can use the include directive. This conditionally reads in files if the class on the left hand side of the assignment matches the host parsing the file. This enables also a variety of cfengine configuration scripts to read in a standard set of default settings. "

I especially note where it says;

"left hand side of the assignment matches the host"

and it seems as if it really means it.

I have something like this;
import:
  Etc_Props_Gotten::
     etc_copy.cf
     svn_etc_links.cf
     svn_etc_files.cf
     svn_etc_dirs.cf

later on;

shellcommands:
  Etc_Updates::
"/usr/bin/svn update" chdir=/home/roepc/working_copy/roe_pc_etc
     "/usr/local/bin/svnpropget.pl"
     chdir=/home/roepc/working_copy/roe_pc_etc
     "/bin/cp -avf svn*.cf /etc/cfengine/"
     chdir=/home/roepc/working_copy/roe_pc_etc
     define=Etc_Props_Gotten

and in the control section;

  actionsequence = (
     shellcommands
     directories editfiles copy files links
     rename tidy
  )

I know that the shell commands exit sucessfuly, but the imports just don't happen. This is disturbing.

I am now assuming that the *only* conditional that cfengine will accept for an import is a hostname. Would this be correct?

If so *arrrrgh!* why??

thanks!


_______________________________________________
Help-cfengine mailing list
Help-cfengine@gnu.org
http://lists.gnu.org/mailman/listinfo/help-cfengine



_______________________________________________
Help-cfengine mailing list
Help-cfengine@gnu.org
http://lists.gnu.org/mailman/listinfo/help-cfengine

--
| Predrag Zecevic | e-Mail: Predrag.Zecevic@2e-Systems.COM |
| 2e Systems GmbH |              Tel: (+49)[0]6107 989 415 |
|Im Taubengrund 12|              Fax: (+49)[0]6107 989 494 |
|65451 Kelsterbach|                                        |
|     Germany     |         Cellular: (+49)[0]174 3109 288 |
+=================+
"I'd give my right arm to be ambidextrous."





reply via email to

[Prev in Thread] Current Thread [Next in Thread]