diff --git a/handlers/main.yml b/handlers/main.yml index d2d0e4f..9cb4835 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -81,6 +81,7 @@ listen: - "Restart zun services" - "venv changed" + - "systemd service changed" - name: Start services systemd: @@ -96,3 +97,4 @@ listen: - "Restart zun services" - "venv changed" + - "systemd service changed" diff --git a/vars/main.yml b/vars/main.yml index 8e6e8a5..fb6d532 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -24,7 +24,7 @@ filtered_zun_services: |- (('condition' not in value) or ('condition' in value and value['condition'])) and not ('wsgi_app' in value and value['wsgi_app']) %} - {% set _ = value.update({'enabled': 'yes', 'state': 'started'}) %} + {% set _ = value.update({'enabled': value['enabled'] | default(True), 'state': value['state'] | default('started')}) %} {% set _ = value.update({'config_overrides': (zun_service_defaults | combine(value.init_config_overrides, recursive=True))}) %} {% set _ = value.pop('init_config_overrides') %} {% set _ = services.append(value) %}