This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ brew install -v cfengine | |
==> Downloading http://cfengine.com/source-code/download?file=cfengine-3.5.2.tar.gz | |
Already downloaded: /Library/Caches/Homebrew/cfengine-3.5.2.tar.gz | |
tar xf /Library/Caches/Homebrew/cfengine-3.5.2.tar.gz | |
==> Patching | |
/usr/bin/patch -f -p1 -i 000-homebrew.diff | |
patching file cf-agent/verify_environments.c | |
patching file cf-agent/verify_files_utils.c | |
==> ./configure --disable-dependency-tracking --prefix=/usr/local/Cellar/cfengine/3.5.2 --with-workdir=/usr/local/var/cfengine --with-tokyocabinet | |
./configure --disable-dependency-tracking --prefix=/usr/local/Cellar/cfengine/3.5.2 --with-workdir=/usr/local/var/cfengine --with-tokyocabinet |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# These go in update.cf (in CFEngine community) or update_policy.cf (in CFEngine Enterprise). | |
# Once these are in place, you need to manually check out /var/cfengine/masterfiles from the appropriate repository. | |
# From then on, "svn up" will be run on it periodically to keep it up to date with respect to the repository. | |
# This needs to be added to the classes: section of the update bundle | |
# Change .svn to .git to use git. | |
classes: | |
"masterfiles_in_svn" | |
expression => fileexists("$(master_location)/.svn"), | |
comment => "Check if $(master_location) is checked out from subversion", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
enterprise> ........................................................................... | |
enterprise> * Hailing 10.39.118.40 : 5308 | |
enterprise> ........................................................................... | |
enterprise> Existing connection to 10.39.118.40 seems to be active... | |
enterprise> Set cfengine port number to 5308 = 5308 | |
enterprise> Set connection timeout to 30 | |
enterprise> -> Connect to 10.39.118.40 = 10.39.118.40 on port 5308 | |
enterprise> -> Selecting FIPS compliant encryption option | |
enterprise> .....................[.h.a.i.l.]................................. | |
enterprise> Strong authentication of server=10.39.118.40 connection confirmed |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vars: | |
"dir" string => "/etc/apache2/modules-enabled"; | |
"index" slist => getindices("array"); | |
"cindex[$(index)]" string => canonify("$(index)"); | |
"files" slist => lsdir("$(dir)", ".*", "false"); | |
classes: | |
"should_exist_$(cindex[$(index)])" expression => "any"; | |
files: | |
"/$(dir)/$(index)" | |
create => "true"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bundle agent configfiles | |
{ | |
vars: | |
# SSHD configuration to set | |
"sshd[Protocol]" string => "2"; | |
"sshd[X11Forwarding]" string => "yes"; | |
"sshd[UseDNS]" string => "no"; | |
methods: | |
"sshd" usebundle => edit_sshd("configfiles.sshd"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bundle agent configfiles | |
{ | |
vars: | |
# Files to edit | |
"files[sysctlconf]" string => "/etc/sysctl.conf"; | |
"files[sshdconfig]" string => "/etc/ssh/sshd_config"; | |
"files[inittab]" string => "/etc/inittab"; | |
# ... | |
methods: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body common control | |
{ | |
bundlesequence => { "globals" }; | |
} | |
bundle agent foo(name) | |
{ | |
vars: | |
"var_$(name)" string => "Hi $(name)"; | |
reports: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7.4.9 edit_template | |
Type: string | |
Allowed input range: "?(/.*) | |
Synopsis: The name of a special CFEngine template file to expand | |
Example: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains any messages produced by compilers while | |
running configure, to aid debugging if configure makes a mistake. | |
It was created by configure, which was | |
generated by GNU Autoconf 2.61. Invocation command line was | |
$ ./configure --enable-maintainer-mode --with-tokyocabinet | |
## --------- ## | |
## Platform. ## |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vars: | |
"allparams" slist => getindices("$(params)"); | |
secondpass:: | |
"sshdparamlist" slist => grep("[^_].*", "allparams"); | |
"sshdparams[$(sshdparamlist)]" string => "$($(params)[$(sshdparamlist)])"; | |
classes: | |
"use_restart_cmd" not => strcmp("$($(params)[_sshd_restart_cmd])", ""); | |
"secondpass" expression => isvariable("allparams"); | |
"thirdpass" expression => isvariable("sshdparamlist"); |