From 588bf5efcfd09eea3fe71b0b78dde3194f65ee61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Mercier?= Date: Wed, 16 Mar 2016 17:49:24 +0100 Subject: [PATCH] change the restart, it was not effective before --- firewalld/config.sls | 4 ++-- firewalld/init.sls | 15 +++++++++++++-- firewalld/services.sls | 4 ++-- firewalld/zones.sls | 5 ++--- 4 files changed, 19 insertions(+), 9 deletions(-) diff --git a/firewalld/config.sls b/firewalld/config.sls index 1a8b5e6..5030df0 100644 --- a/firewalld/config.sls +++ b/firewalld/config.sls @@ -13,7 +13,7 @@ directory_firewalld: - require: - pkg: package_firewalld # make sure package is installed - listen_in: - - service: service_firewalld # restart service + - module: service_firewalld # restart service config_firewalld: file.managed: @@ -27,5 +27,5 @@ config_firewalld: - pkg: package_firewalld # make sure package is installed - file: directory_firewalld - listen_in: - - service: service_firewalld # restart service + - module: service_firewalld # restart service diff --git a/firewalld/init.sls b/firewalld/init.sls index 9f9ff0c..6fbc02c 100644 --- a/firewalld/init.sls +++ b/firewalld/init.sls @@ -24,7 +24,7 @@ package_firewalld: pkg.installed: - name: {{ firewalld.package }} -service_firewalld: +service_firewalld_running: service.running: - name: {{ firewalld.service }} - enable: True # start on boot @@ -33,8 +33,19 @@ service_firewalld: - file: config_firewalld - service: iptables # ensure it's stopped - service: ip6tables # ensure it's stopped -{% else %} + service_firewalld: + module.wait: + - name: service.restart + - m_name: {{ firewalld.service }} + - require: + - pkg: package_firewalld + - file: config_firewalld + - service: iptables # ensure it's stopped + - service: ip6tables # ensure it's stopped + +{% else %} +service_firewalld_dead: service.dead: - name: {{ firewalld.service }} - enable: False # don't start on boot diff --git a/firewalld/services.sls b/firewalld/services.sls index 68f462d..4cfdab1 100644 --- a/firewalld/services.sls +++ b/firewalld/services.sls @@ -13,7 +13,7 @@ directory_firewalld_services: - require: - pkg: package_firewalld # make sure package is installed - listen_in: - - service: service_firewalld # restart service + - module: service_firewalld # restart service # == Define: firewalld.services @@ -37,7 +37,7 @@ directory_firewalld_services: - pkg: package_firewalld # make sure package is installed - file: directory_firewalld_services - listen_in: - - service: service_firewalld # restart service + - module: service_firewalld # restart service - context: name: {{ s_name }} service: {{ v }} diff --git a/firewalld/zones.sls b/firewalld/zones.sls index 67cf1cb..6517855 100644 --- a/firewalld/zones.sls +++ b/firewalld/zones.sls @@ -13,8 +13,7 @@ directory_firewalld_zones: - require: - pkg: package_firewalld # make sure package is installed - listen_in: - - service: service_firewalld # restart service - + - module: service_firewalld # restart service # == Define: firewalld.zones # @@ -35,7 +34,7 @@ directory_firewalld_zones: - pkg: package_firewalld # make sure package is installed - file: directory_firewalld_zones - listen_in: - - service: service_firewalld # restart service + - module: service_firewalld # restart service - context: name: {{ z_name }} zone: {{ v }}