2014-12-07 23:39:44 +00:00
|
|
|
# Expected vars
|
2018-04-11 21:51:03 +00:00
|
|
|
# - site_name...
|
2015-01-19 19:28:33 +00:00
|
|
|
# - cert_name...
|
2014-12-07 23:39:44 +00:00
|
|
|
# - server_aliases: []
|
|
|
|
# - server_admin: webmaster@fedoraproject.org
|
|
|
|
# - ssl: true
|
|
|
|
# - sslonly: false
|
|
|
|
# - SSLCertificateChainFile: ""
|
|
|
|
# - gzip: false
|
|
|
|
|
2018-04-11 21:51:03 +00:00
|
|
|
- name: Create site directory in httpd/conf.d/{{site_name}}
|
2014-12-07 23:39:44 +00:00
|
|
|
file: >
|
2018-04-11 21:51:03 +00:00
|
|
|
dest=/etc/httpd/conf.d/{{site_name}}
|
2014-12-07 23:39:44 +00:00
|
|
|
state=directory
|
|
|
|
owner=root
|
|
|
|
group=root
|
|
|
|
mode=0755
|
|
|
|
notify:
|
2016-12-01 21:36:07 +00:00
|
|
|
- reload proxyhttpd
|
2014-12-07 23:39:44 +00:00
|
|
|
tags:
|
|
|
|
- httpd
|
|
|
|
- httpd/website
|
2019-01-29 03:19:48 +00:00
|
|
|
- robots
|
2014-12-07 23:39:44 +00:00
|
|
|
|
2018-05-17 05:06:23 +00:00
|
|
|
- name: Letsencrypt certificate stuff
|
|
|
|
include_role: name=letsencrypt
|
|
|
|
when: certbot == True
|
2014-12-07 23:39:44 +00:00
|
|
|
|
2018-04-11 21:51:03 +00:00
|
|
|
- name: Copy over primary template for {{site_name}}
|
2014-12-07 23:39:44 +00:00
|
|
|
template: >
|
|
|
|
src=website.conf
|
2018-04-11 21:51:03 +00:00
|
|
|
dest=/etc/httpd/conf.d/{{site_name}}.conf
|
2014-12-07 23:39:44 +00:00
|
|
|
owner=root
|
|
|
|
group=root
|
|
|
|
mode=0644
|
|
|
|
notify:
|
2016-12-01 21:36:07 +00:00
|
|
|
- reload proxyhttpd
|
2014-12-07 23:39:44 +00:00
|
|
|
tags:
|
|
|
|
- httpd
|
2014-12-07 23:43:38 +00:00
|
|
|
- httpd/website
|
2018-04-17 23:50:00 +02:00
|
|
|
- h2
|
2019-04-08 21:41:17 +02:00
|
|
|
- sslciphers
|
2014-12-07 23:39:44 +00:00
|
|
|
|
2018-04-11 21:51:03 +00:00
|
|
|
- name: Copy over some subordinate templates for {{site_name}}
|
2014-12-07 23:39:44 +00:00
|
|
|
template: >
|
|
|
|
src={{item}}.conf
|
2018-04-11 21:51:03 +00:00
|
|
|
dest=/etc/httpd/conf.d/{{site_name}}/{{item}}.conf
|
2014-12-07 23:39:44 +00:00
|
|
|
owner=root
|
|
|
|
group=root
|
|
|
|
mode=0644
|
|
|
|
with_items:
|
|
|
|
- logs
|
|
|
|
- robots
|
2017-10-16 21:47:06 +00:00
|
|
|
- securityheaders
|
2014-12-07 23:39:44 +00:00
|
|
|
notify:
|
2016-12-01 21:36:07 +00:00
|
|
|
- reload proxyhttpd
|
2014-12-07 23:39:44 +00:00
|
|
|
tags:
|
|
|
|
- httpd
|
2014-12-07 23:43:38 +00:00
|
|
|
- httpd/website
|
2019-01-29 02:00:39 +00:00
|
|
|
- robots
|
2014-12-07 23:39:44 +00:00
|
|
|
|
|
|
|
- name: And lastly, the robots.txt file
|
2019-01-28 22:43:00 +00:00
|
|
|
template: >
|
2014-12-07 23:39:44 +00:00
|
|
|
src={{item}}
|
2019-01-29 01:49:44 +00:00
|
|
|
dest=/srv/web/{{site_name}}-robots.txt
|
2014-12-07 23:39:44 +00:00
|
|
|
mode=0644
|
|
|
|
owner=root
|
|
|
|
group=root
|
2015-01-06 21:21:24 +00:00
|
|
|
setype=httpd_sys_content_t
|
2014-12-07 23:39:44 +00:00
|
|
|
with_first_found:
|
2019-01-29 01:49:44 +00:00
|
|
|
- robots/{{site_name}}-robots.txt
|
2014-12-07 23:39:44 +00:00
|
|
|
- robots/robots.txt
|
|
|
|
notify:
|
2016-12-01 21:36:07 +00:00
|
|
|
- reload proxyhttpd
|
2014-12-07 23:39:44 +00:00
|
|
|
tags:
|
|
|
|
- httpd
|
2014-12-07 23:43:38 +00:00
|
|
|
- httpd/website
|
2017-12-06 20:38:28 +00:00
|
|
|
- robots
|