diff --git a/cloud-init-templates/cloud_config_centos.jinja2 b/cloud-init-templates/cloud_config_centos.jinja2 index 43d310b0..efbf37a4 100644 --- a/cloud-init-templates/cloud_config_centos.jinja2 +++ b/cloud-init-templates/cloud_config_centos.jinja2 @@ -40,6 +40,7 @@ runcmd: - chkconfig mcollective off {% else %} - chkconfig mcollective on + - service mcollective restart {% endif %} - iptables -t filter -F INPUT - iptables -t filter -F FORWARD diff --git a/cloud-init-templates/cloud_config_ubuntu.jinja2 b/cloud-init-templates/cloud_config_ubuntu.jinja2 index 87e52165..a7911348 100644 --- a/cloud-init-templates/cloud_config_ubuntu.jinja2 +++ b/cloud-init-templates/cloud_config_ubuntu.jinja2 @@ -93,6 +93,9 @@ runcmd: {% if mcollective.enable != 1 %} - /usr/sbin/invoke-rc.d mcollective stop - /usr/sbin/update-rc.d -f mcollective remove +{% else %} + - /usr/sbin/update-rc.d mcollective defaults + - service mcollective restart {% endif %} - iptables -t filter -F INPUT - iptables -t filter -F FORWARD