diff --git a/plugins/provisioners/cfengine/cap/debian/cfengine_install.rb b/plugins/provisioners/cfengine/cap/debian/cfengine_install.rb index f57522abf..57c235654 100644 --- a/plugins/provisioners/cfengine/cap/debian/cfengine_install.rb +++ b/plugins/provisioners/cfengine/cap/debian/cfengine_install.rb @@ -9,7 +9,7 @@ module VagrantPlugins comm.sudo("GPGFILE=`tempfile`; wget -O $GPGFILE #{config.repo_gpg_key_url} && apt-key add $GPGFILE; rm -f $GPGFILE") comm.sudo("apt-get update") - comm.sudo("apt-get install -y cfengine-community") + comm.sudo("apt-get install -y #{config.package_name}") end end end diff --git a/plugins/provisioners/cfengine/cap/redhat/cfengine_install.rb b/plugins/provisioners/cfengine/cap/redhat/cfengine_install.rb index 820886f4d..828b336d6 100644 --- a/plugins/provisioners/cfengine/cap/redhat/cfengine_install.rb +++ b/plugins/provisioners/cfengine/cap/redhat/cfengine_install.rb @@ -14,7 +14,7 @@ module VagrantPlugins logger.info("Installing CFEngine Community Yum Repository GPG KEY from #{config.repo_gpg_key_url}") comm.sudo("GPGFILE=$(mktemp) && wget -O $GPGFILE #{config.repo_gpg_key_url} && rpm --import $GPGFILE; rm -f $GPGFILE") - comm.sudo("yum -y install cfengine-community") + comm.sudo("yum -y install #{config.package_name}") end end end diff --git a/plugins/provisioners/cfengine/config.rb b/plugins/provisioners/cfengine/config.rb index 9ecff81dd..5d3cd3f02 100644 --- a/plugins/provisioners/cfengine/config.rb +++ b/plugins/provisioners/cfengine/config.rb @@ -20,6 +20,7 @@ module VagrantPlugins attr_accessor :upload_path attr_accessor :yum_repo_file attr_accessor :yum_repo_url + attr_accessor :package_name def initialize @am_policy_hub = UNSET_VALUE @@ -37,6 +38,7 @@ module VagrantPlugins @upload_path = UNSET_VALUE @yum_repo_file = UNSET_VALUE @yum_repo_url = UNSET_VALUE + @package_name = UNSET_VALUE end def finalize! @@ -81,6 +83,10 @@ module VagrantPlugins if @yum_repo_url == UNSET_VALUE @yum_repo_url = "http://cfengine.com/pub/yum/" end + + if @package_name == UNSET_VALUE + @package_name = "cfengine-community" + end end def validate(machine) diff --git a/plugins/provisioners/cfengine/provisioner.rb b/plugins/provisioners/cfengine/provisioner.rb index 614289734..f9a60676a 100644 --- a/plugins/provisioners/cfengine/provisioner.rb +++ b/plugins/provisioners/cfengine/provisioner.rb @@ -87,7 +87,7 @@ module VagrantPlugins @machine.ui.info(I18n.t("vagrant.cfengine_bootstrapping", policy_server: policy_server_address)) - result = cfagent("--bootstrap --policy-server #{policy_server_address}", error_check: false) + result = cfagent("--bootstrap #{policy_server_address}", error_check: false) raise Vagrant::Errors::CFEngineBootstrapFailed if result != 0 # Policy hubs need to do additional things before they're ready