Skip to content

Commit

Permalink
Fixed config.php template for absent Redis deployment.
Browse files Browse the repository at this point in the history
  • Loading branch information
ypid committed Jul 5, 2016
1 parent a7d2f8b commit f6f6bea
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions templates/srv/www/sites/config/debops.config.php.j2
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@
| combine(owncloud_config_host) %}
{% set owncloud__tpl_active_config_dict = {} %}
{% for config_key, config_item in owncloud__tpl_unchecked_config_dict.iteritems() %}
{% if config_item is mapping and "state" in config_item and config_item.state == "present" and "value" in config_item %}
{% set _ = owncloud__tpl_active_config_dict.update({config_key: config_item.value}) %}
{% if config_item is mapping and "state" in config_item and config_item.state and "value" in config_item %}
{% if config_item.state == "present" %}
{% set _ = owncloud__tpl_active_config_dict.update({config_key: config_item.value}) %}
{% endif %}
{% else %}
{# Assume it is not a control structur for Ansible but the raw value for ownCloud #}
{# Assume it is not a control structure for Ansible but the raw value for ownCloud #}
{% set _ = owncloud__tpl_active_config_dict.update({config_key: config_item}) %}
{% endif %}
{% endfor %}
Expand Down

0 comments on commit f6f6bea

Please sign in to comment.