[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: conditional import for other than hostname?
From: |
Brendan Strejcek |
Subject: |
Re: conditional import for other than hostname? |
Date: |
Sun, 30 May 2004 20:36:03 -0500 |
User-agent: |
Mutt/1.3.28i |
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
>