Files
fedora-infra_ansible/roles/httpd/website/tasks/main.yml
Patrick Uiterwijk 08568865fe Replace all restart httpd with reload httpd
Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
2015-11-04 23:40:01 +00:00

71 lines
1.3 KiB
YAML

# Expected vars
# - name...
# - cert_name...
# - server_aliases: []
# - server_admin: webmaster@fedoraproject.org
# - ssl: true
# - sslonly: false
# - SSLCertificateChainFile: ""
# - gzip: false
- name: Create site directory in httpd/conf.d/{{name}}
file: >
dest=/etc/httpd/conf.d/{{name}}
state=directory
owner=root
group=root
mode=0755
notify:
- reload httpd
tags:
- httpd
- httpd/website
# TODO - copy in Httpd::Certificate
- name: Copy over primary template for {{name}}
template: >
src=website.conf
dest=/etc/httpd/conf.d/{{name}}.conf
owner=root
group=root
mode=0644
notify:
- reload httpd
tags:
- httpd
- httpd/website
- name: Copy over some subordinate templates for {{name}}
template: >
src={{item}}.conf
dest=/etc/httpd/conf.d/{{name}}/{{item}}.conf
owner=root
group=root
mode=0644
with_items:
- logs
- robots
notify:
- reload httpd
tags:
- httpd
- httpd/website
- name: And lastly, the robots.txt file
copy: >
src={{item}}
dest=/srv/web/robots.txt.{{name}}
mode=0644
owner=root
group=root
setype=httpd_sys_content_t
with_first_found:
- robots/robots.txt.{{name}}
- robots/robots.txt
notify:
- reload httpd
tags:
- httpd
- httpd/website