Comments (1)
Part of the problem is that it's running the sed command even if the module is already loaded or statically compiled in. That seems backwards from what you'd want.
I can't speak to what Arch needs and I don't have any in my environment, but I've split out the RedHat family to do its own thing, and to only run the sed command UNLESS it's already loaded/compiled in.
{% elif grains.os_family in ('RedHat') %}
cmd.run:
- name: find /etc/httpd/ -name '*.conf' -type f -exec sed -i -e 's/\(^#\)\(\s*LoadModule.{{ module }}_module\)/\2/g' {} \;
- unless: (httpd -M 2> /dev/null |grep "[[:space:]]{{ module }}_module")
{% elif grains.os_family in ('Arch') %}
cmd.run:
- name: find /etc/httpd/ -name '*.conf' -type f -exec sed -i -e 's/\(^#\)\(\s*LoadModule.{{ module }}_module\)/\2/g' {} \;
- onlyif: {{ grains.os_family in ('Arch',) and 'true' }} || (httpd -M 2> /dev/null |grep "[[:space:]]{{ module }}_module")
from apache-formula.
Related Issues (20)
- Default log formats doesn't use IP from mod remoteip in debian
- [BUG] apache.vhost.cleanup fails if apache is not yet installed HOT 2
- [FEATURE] support mod_md
- In Debian apache.config plays two opposite actions HOT 1
- A recursive requisite was found in apache.config.modules.mod_security
- [BUG] use of tpldir variable does not allow the formula to be wrapped HOT 12
- [BUG] apache.vhosts.standard (and potentially others) generate MemoryError HOT 9
- [BUG] apache.config.vhosts.standard: mapping error when "enabled: false" HOT 3
- yaml syntax error in mod_pagespeed.sls HOT 1
- [BUG] syntax error near "module;" in apache/config/register_site.sls line 66 HOT 1
- [BUG] apache.config.modules.mod_wsgi fails, pkg: apache not found HOT 2
- [BUG] apache.config.vhosts.cleanup now remove the service HOT 3
- [BUG] in vhosts/standard.sls the map.pop affects the apache variable as well because it is a reference, not a copy HOT 3
- [BUG] ssl.conf should never be removed - should always be managed
- [BUG] vhost proxy.tmpl doesn' add DocumentRoot
- [BUG] ID apache-service-running in SLS apache.service.running is not a dictionary
- [FEATURE] Add SSLCACertificate
- [FEATURE] handle multiple CustomLog directives
- [BUG] apache.clean removed too much files, breaking installation after reinstall
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from apache-formula.