On 12/11/2015 02:59 PM, Reindl Harald wrote: > and that's exactly what i don't want to do for damned good reasons > > * in the past i started httpd with type=forking > * it was just "/usr/sbin/httpd $OPTIONS" > * switch to "Type=simple" was change the untit in our own > maintained rpm-package and add "-D FOREGROUND" too
Hi. Here is how you solve the problem with the right tool for the job:
---
# configapache.yml
hosts: apacheservers
sudo: True
tasks:
- name: configure apache
template:
dest: /etc/httpd/conf/httpd.conf
src: httpd.conf.jinja2
notify: reload apache
- name: copy testserver stuff
copy:
dest: /etc/httpd/conf/local/testserver.conf
src: testserver.conf
notify: reload apache
handlers:
- name: reload apache
service: httpd state=reloaded
---
# httpd.conf.jinja2
...standard config...
{% if apache.testserver %}
Include "conf/local/testserver.conf"
{% endif %}
---
# host_vars/apache1.yml
apache:
testserver: True
---
# hosts
apache1
apache2
apache3
postfix1
postfix2
[apacheservers]
apache1
apache2
apache3
---
# your prompt
ansible-playbook -v configapache.yml
There you go -- a quick way to do proper Apache configuration without
dicking with EnvironmentFiles that *actually preserves the ability to
reload Apache with no downtime!*
--
Rudd-O
http://rudd-o.com/
signature.asc
Description: OpenPGP digital signature
_______________________________________________ systemd-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/systemd-devel
