Created
February 7, 2012 16:17
-
-
Save adamgoucher/1760493 to your computer and use it in GitHub Desktop.
how to use selenium and pear with cfengine
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 => { "packages", "channels", "prickly" }; | |
} | |
#http://cfengine.com/manuals/CfengineStdLibrary.html#body-package_005fmethod-yum | |
body package_method yum | |
{ | |
package_changes => "bulk"; | |
package_list_command => "/usr/bin/yum list installed"; | |
package_patch_list_command => "/usr/bin/yum check-update"; | |
# Remember to escape special characters like | | |
# fixme: the default regex doesnt work with a package named like java-1.6.0-openjdk | |
#package_list_name_regex => "([^.]+).*"; | |
package_list_name_regex => "(.*)\.(?!.*\.)"; | |
package_list_version_regex => "[^\s]\s+([^\s]+).*"; | |
package_list_arch_regex => "[^.]+\.([^\s]+).*"; | |
package_installed_regex => ".*(installed|\s+@).*"; | |
package_name_convention => "$(name).$(arch)"; | |
# set it to "0" to avoid caching of list during upgrade | |
package_list_update_ifelapsed => "240"; | |
package_patch_installed_regex => "^\s.*"; | |
package_patch_name_regex => "([^.]+).*"; | |
package_patch_version_regex => "[^\s]\s+([^\s]+).*"; | |
package_patch_arch_regex => "[^.]+\.([^\s]+).*"; | |
package_add_command => "/usr/bin/yum -y install"; | |
package_update_command => "/usr/bin/yum -y update"; | |
package_delete_command => "/bin/rpm -e --nodeps"; | |
package_verify_command => "/bin/rpm -V"; | |
} | |
bundle agent packages | |
{ | |
vars: | |
"match_package" slist => { | |
"php", | |
"php-pear", | |
"java-1.6.0-openjdk" | |
}; | |
packages: | |
centos:: | |
"$(match_package)" | |
package_policy => "add", | |
package_method => yum; | |
} | |
# fixme - this always adds; need to figure out how to check if its | |
# there and only add if not | |
bundle agent channels | |
{ | |
commands: | |
"/usr/bin/pear channel-discover element-34.github.com/pear"; | |
"/usr/bin/pear channel-discover pear.phpunit.de"; | |
} | |
# fixme - all these regexes need to be tweaked in order to properly | |
# determine whether a package is installed, has updates, etc. | |
body package_method pear | |
{ | |
package_changes => "bulk"; | |
package_list_command => "/usr/bin/pear list -a"; | |
package_patch_list_command => "/usr/bin/pear list-upgrades"; | |
# Remember to escape special characters like | | |
package_list_name_regex => "([^.]+).*"; | |
package_list_version_regex => "[^\s]\s+([^\s]+).*"; | |
package_list_arch_regex => "[^.]+\.([^\s]+).*"; | |
package_installed_regex => "(@).*"; | |
package_name_convention => "$(channel)/$(name)"; | |
# set it to "0" to avoid caching of list during upgrade | |
package_list_update_ifelapsed => "240"; | |
package_patch_installed_regex => "^\s.*"; | |
package_patch_name_regex => "([^.]+).*"; | |
package_patch_version_regex => "[^\s]\s+([^\s]+).*"; | |
package_patch_arch_regex => "[^.]+\.([^\s]+).*"; | |
package_add_command => "/usr/bin/pear install -f"; | |
package_update_command => "/usr/bin/pear upgrade -f"; | |
package_delete_command => "/usr/bin/pear uninstall -f"; | |
package_verify_command => "/usr/bin/pear info"; | |
} | |
bundle agent prickly | |
{ | |
vars: | |
"match_package" slist => { | |
"element-34/SaunterPHP" | |
}; | |
packages: | |
centos:: | |
"$(match_package)" | |
package_policy => "add", | |
package_method => pear; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment