[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
imports and file copy
From: |
Brian E. Seppanen |
Subject: |
imports and file copy |
Date: |
Fri, 28 Jan 2005 09:53:19 -0500 (EST) |
I am tearing apart much of my previous configuration, and trying to
understand cfengine better. Not an easy task...
I'm running cfengine 2.1.10
I have a file hierarchy on a master host with the following layout
/var/cfengine/services/
dns/cf.dns
proxy/cf.proxy
smtp/cf.smtp
servicea/cf.servicea
serviceb/cf.serviceb
...etc...
/var/cfengine/markets/
marketa/cf.marketa
marketb/cf.marketb
marketc/cf.marketc
...etc...
/var/cfengine/os/
linux/cf.linux
solaris/cf.solaris
...etc...
Right now I'm having a problem with getting the file in
/var/cfengine/services/servicea/cf.servicea copied to
/var/cfengine/inputs/cf.servicea
I've created a cfagent.conf as follows
control:
actionsequence = ( copy )
TrustKey = ( true )
TrustKeysFrom = ( masterhost )
Underscore_Classes = ( on )
access = ( root )
EmailFrom = ( cfengine@domaina )
EmailMaxLines = ( 10000 )
EditfileSize = ( 800000 )
IfElapsed = ( 2 )
ExpireAfter = ( 2 )
domain = ( domaina )
import:
any:: cf.groups
# Service Specific
dns:: cf.dns
proxy:: cf.proxy
# OS Specific
linux:: cf.linux
solaris:: cf.solaris
copy:
linux::
/var/cfengine/os/linux/cf.linux
dest=/var/cfengine/inputs/cf.linux
server=masterhost
trustkey=true
encrypt=true
force=true
dns::
/var/cfengine/services/dns/cf.dns
dest=/var/cfengine/inputs/cf.dns
server=masterhost
trustkey=true
encrypt=true
force=true
my update.conf
control:
actionsequence = ( copy shellcommands )
domain = ( domaina )
workdir = ( /var/cfengine )
policyhost = ( masterhost )
master_cfinput = ( /var/cfengine/inputs )
cf_install_dir = ( /var/cfengine/sbin )
SplayTime = ( 2 ) # minutes
ExpireAfter = ( 2 )
IfElapsed = ( 2 )
OutputPrefix = ( "init->" )
copy:
/var/cfengine/inputs/cfagent.conf
dest=/var/cfengine/inputs/cfagent.conf
server=masterhost
trustkey=true
encrypt=true
force=true
/var/cfengine/inputs/update.conf
dest=/var/cfengine/inputs/update.conf
server=masterhost
trustkey=true
encrypt=true
force=true
/var/cfengine/inputs/cf.groups
dest=/var/cfengine/inputs/cf.groups
server=masterhost
trustkey=true
encrypt=true
force=true
shellcommands:
"/var/cfengine/sbin/cfagent -i -v -f /var/cfengine/inputs/cfagent.conf"
so if I run /var/cfengine/sbin/cfagent -v -f
/var/cfengine/inputs/update.conf
I am expecting that it copy an updated cfagent.conf and execute it. In
the cfagent.conf I'm importing the cf.groups. If it evaluates a class
that it belongs to it should copy the relevent updated.cf file and execute
it.
So on my master host, I delete cf.linux from /var/cfengine/inputs because
I expect it to use copy a new copy from /var/cfengine/os/linux into
/var/cfengine/inputs before it executes.
I get the output in the attached file. It doesn't find cf.linux.
What am I doing wrong? It seems like it should work. This is a pretty
humbling experience... Honest, I have read the documentation... and yet
it still seems I don't "get" it.
Do I need to move my imports to update.conf? Do I then need to move the
copies to update.conf?
Thanks for all of the help.
Brian Seppanen
seppy@chartermi.net
608.826.1464
testexec.txt
Description: Text document
- imports and file copy,
Brian E. Seppanen <=