File tree Expand file tree Collapse file tree 2 files changed +31
-0
lines changed Expand file tree Collapse file tree 2 files changed +31
-0
lines changed Original file line number Diff line number Diff line change 1+ {% from " apache/map.jinja" import apache with context % }
2+
3+ {% if grains[' os_family' ]== " Debian" % }
4+ include:
5+ - apache
6+
7+ libapache2- mod- upload- progress:
8+ pkg.installed
9+
10+ a2enmod upload_progress:
11+ cmd.run:
12+ - unless: ls / etc/ apache2/ mods- enabled/ upload_progress.load
13+ - order: 255
14+ - require:
15+ - pkg: libapache2- mod- upload- progress
16+ - watch_in:
17+ - module: apache- restart
18+ - require_in:
19+ - module: apache- restart
20+ - module: apache- reload
21+ - service: apache
22+ {% endif % }
Original file line number Diff line number Diff line change 22
33include:
44 - apache
5+ {%- set existing_states = salt[' cp.list_states' ]() %}
6+ {%- for module in salt[' pillar.get' ](' apache:modules:enabled' , []) %}
7+ {%- set mod_state = ' apache.mod_{} ' .format(module) %}
8+ {%- if mod_state in existing_states %}
9+ - {{ mod_state }}
10+ {%- endif %}
11+ {%- endfor %}
512
613{% for module in salt[' pillar.get' ](' apache:modules:enabled' , []) %}
14+ {% if module not in existing_states %}
715a2enmod {{ module }} :
816 cmd.run :
917 - unless: ls /etc/apache2/mods-enabled/ {{ module }}.load
@@ -16,6 +24,7 @@ a2enmod {{ module }}:
1624 - module: apache-restart
1725 - module: apache-reload
1826 - service: apache
27+ {% endif %}
1928{% endfor %}
2029
2130{% for module in salt[' pillar.get' ](' apache:modules:disabled' , []) %}
You can’t perform that action at this time.
0 commit comments