help-cfengine
[Top][All Lists]
Advanced

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

Can't figure this one out...


From: Kirk Bauer
Subject: Can't figure this one out...
Date: Wed, 15 Mar 2006 20:28:56 -0700 (MST)

I can't figure out what is going on with this problem of mine, and I'm
hoping somebody can help.  Here is the output of 'cfagent -v | grep
ntp' (slightly trimmed for security):

Looking for an input file includes/ntp.conf
Defined Classes = ( 172_.._... 172_.._..._.. 32_bit Day15 Hr20 Hr20_Q2 March 
Min15_20 Min19 Q2 Wednesday Yr2006 amd_starts_at_boot any autofs_starts_at_boot 
bbc_starts_at_boot cfengine_2 cfengine_2_1 cfengine_2_1_14 
compiled_on_linux_gnu ipv4_172 ipv4_172_24 ipv4_172_24_216 ipv4_172_24_216_19 
linux linux_2_4_21_32_EL linux_x86_64 linux_x86_64_2_4_21_32_EL 
linux_x86_64_2_4_21_32_EL__1_Fri_Apr_15_21_18_42_EDT_2005 lsf_servers 
net_iface_eth0 net_iface_lo nscd_starts_at_boot ntp_servers ntpd_starts_at_boot 
........ .......................... redhat rlogin_enabled rsh_enabled satadrive 
start_cfexecd start_cfservd telnet_enabled vsftpd_enabled x86_64 
ypbind_starts_at_boot )
Installable classes = ( no_default_route aftercopy ntpd_restart 
ssh_keys_changed rpm_keys_changed )
Checking copy from ..........................:/ks/cfengine/distrib/ntp.conf to 
/etc/ntp.conf
cfengine:phxlxps4: Update of image /etc/ntp.conf from master 
/ks/cfengine/distrib/ntp.conf on ..........................
cfengine:phxlxps4: Object /etc/ntp.conf had permission 600, changed it to 644
Checking copy from 
..........................:/ks/cfengine/distrib/server-ntp.conf to /etc/ntp.conf
cfengine:phxlxps4: Update of image /etc/ntp.conf from master 
/ks/cfengine/distrib/server-ntp.conf on ..........................
cfengine:phxlxps4: Executing script /sbin/service ntpd 
restart...(timeout=0,uid=-1,gid=-1)
cfengine:phxlxps4:in/service ntpd: Shutting down ntpd:     [  OK  ]
cfengine:phxlxps4:in/service ntpd: Starting ntpd:          [  OK  ]
cfengine:phxlxps4: Finished script /sbin/service ntpd restart

Note how this machine is a member of the 'ntp_servers' class, yet it copies
both ntp.conf and, later, server-ntp.conf.  I expect it to ONLY copy 
server-ntp.conf.

Here are the related configuration sections:

-------------------------------------------------------------------------------
(in cfagent.conf file)
control:
   # The following line allows cfagent to be run more frequently than once per 
minute
   IfElapsed      = ( 0 ) # For debugging -- remove for normal operation
   domain         = ( ................. )
   timezone       = ( MST )
   access         = ( root )
   smtpserver     = ( smtphost.example.org )  # used by cfexecd
   sysadm         = ( admin@example.com )     # where to mail output
   schedule       = ( Min00_05 )

import:
   any::
      # Include config file that defines special classes
      includes/classes.conf

      # Include config file that configures NTP
      includes/ntp.conf

-------------------------------------------------------------------------------

-------------------------------------------------------------------------------
(in includes/classes.conf file)
classes:
   ntp_servers = ( phxlxps2 phxlxps3 phxlxps4 )
-------------------------------------------------------------------------------

-------------------------------------------------------------------------------
(in includes/ntp.conf file)
control:
   actionsequence = ( copy shellcommands.aftercopy )

classes:
   ntpd_starts_at_boot = ( '/sbin/chkconfig ntpd' )

copy:
   ntp_servers::
     /ks/cfengine/distrib/server-ntp.conf dest=/etc/ntp.conf
                                  mode=0644
                                  owner=root
                                  group=root
                                  type=binary
                                  define=ntpd_restart
                                  server=$(policyhost)
   !ntp_servers::
     /ks/cfengine/distrib/ntp.conf dest=/etc/ntp.conf
                                  mode=0644
                                  owner=root
                                  group=root
                                  type=binary
                                  define=ntpd_restart
                                  server=$(policyhost)

shellcommands:
   !ntpd_starts_at_boot::
      # Set ntpd to start at boot time
      "/sbin/chkconfig ntpd on"
   ntpd_restart::
      "/sbin/service ntpd restart"
-------------------------------------------------------------------------------




--
Kirk Bauer <kirk@kaybee.org>
http://linux.kaybee.org | www.autorpm.org | www.logwatch.org




reply via email to

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