【正文】
ysFrom = ( )自動交換key,不需要拷貝key LogAllConnections = ( true ) AllowUsers = ( root admin ) HostnameKeys = ( off ) ChecksumDatabase = ( /var/cfengine/cfdb ) grant: $(cfrunCommand),可以cfrun方式遠程執(zhí)行cfagent /var/,通過cfagent訪問拷貝此目錄下的文件注意:,可以根據(jù)需要進行權(quán)限的限制4. (cfagent運行時,第一解析的配置文件) cat /var/cfengine/clientconf/ ensure that the inputs and binaries in /var/cfengine are synced to those on the server. control: actionsequence = ( copy ) sequence of actions to perform domain = ( ) our domain DefaultCopyType = ( checksum ) Copy based on checksum, not mtime HostnameKeys = ( off ) cfserver = ( ) host running cfservd workdir = ( /var/cfengine ) the workdir clientconf = ( /var/cfengine/clientconf ) input_mode = ( 700 ) mode for input files bin_mode = ( 755 ) mode for binaries fowner = ( root ) file owner ogroup = ( root ) file group any:: the class to match SplayTime = ( 1 ) max number of minutes over which cfengine will share its load on the server copy: $(clientconf)/ dest=$(workdir)/inputs/ owner=$(fowner) group=$(ogroup) mode=700 server=$(cfserver) trustkey=true encrypt=true注意:,,.5. (cfengine的核心配置文件,所有的功能操作都在此配置文件中定義) cat /var/cfengine/clientconf/ for client group區(qū)塊定義群組(classes),可以在后續(xù)的配置中指定特定的組群執(zhí)行特定的操作,. groups: Redhat_AS3 = ( redhat_as_3 ) Redhat_AS4 = ( redhat_as_4 ) Redhat_2u1 = ( redhat_as_2_1 ) Redhat_7u3 = ( redhat_7_3 ) Redhat_AS5 = ( redhat_s_5 ) control: any:: Basic Cfengine configurations access = ( root ) editfilesize = ( 0 ) 0 turns off the editfilesize limit. netmask = ( ) Sets the netmask if you use netconfig. timezone = ( CST ) How and Where do we output stuff? sysadmin = ( admin ) smtpserver = ( ) EmailMaxLines = ( n ) No maximum lines Syslog = ( on ) How many cfengines can run, what do we do when the server39。 可以根據(jù)執(zhí)行命令程序的返回結(jié)果來定義class,如果命令返回結(jié)果為0,此系統(tǒng)屬于此定義的class. ) web_normal =