mirror of
https://pagure.io/fedora-infra/ansible.git
synced 2026-05-01 22:11:01 +08:00
This will unify all the handlers to use first uppercase letter for ansible-lint to stop complaining. I went through all `notify:` occurrences and fixed them by running ``` set TEXT "text_to_replace"; set REPLACEMENT "replacement_text"; git grep -rlz "$TEXT" . | xargs -0 sed -i "s/$TEXT/$REPLACEMENT/g" ``` Then I went through all the changes and removed the ones that wasn't expected to be changed. Fixes https://pagure.io/fedora-infrastructure/issue/12391 Signed-off-by: Michal Konecny <mkonecny@redhat.com>
96 lines
1.8 KiB
YAML
96 lines
1.8 KiB
YAML
# Expected vars
|
|
# - site_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/{{site_name}}
|
|
ansible.builtin.file: >
|
|
dest=/etc/httpd/conf.d/{{site_name}}
|
|
state=directory
|
|
owner=root
|
|
group=root
|
|
mode=0755
|
|
notify:
|
|
- Reload proxyhttpd
|
|
tags:
|
|
- httpd
|
|
- httpd/website
|
|
- robots
|
|
|
|
- name: Letsencrypt certificate stuff
|
|
include_role: name=letsencrypt
|
|
when: certbot == True
|
|
tags:
|
|
- letsencrypt
|
|
|
|
- name: Copy over primary template for {{site_name}}
|
|
ansible.builtin.template: >
|
|
src=website.conf
|
|
dest=/etc/httpd/conf.d/{{site_name}}.conf
|
|
owner=root
|
|
group=root
|
|
mode=0644
|
|
notify:
|
|
- Reload proxyhttpd
|
|
tags:
|
|
- httpd
|
|
- httpd/website
|
|
- h2
|
|
- sslciphers
|
|
|
|
- name: Copy over some subordinate templates for {{site_name}}
|
|
ansible.builtin.template: >
|
|
src={{item}}.conf
|
|
dest=/etc/httpd/conf.d/{{site_name}}/{{item}}.conf
|
|
owner=root
|
|
group=root
|
|
mode=0644
|
|
with_items:
|
|
- logs
|
|
- robots
|
|
- securityheaders
|
|
notify:
|
|
- Reload proxyhttpd
|
|
tags:
|
|
- httpd
|
|
- httpd/website
|
|
- robots
|
|
|
|
- name: Create /srv/web
|
|
ansible.builtin.file: >
|
|
dest=/srv/web
|
|
state=directory
|
|
owner=root
|
|
group=root
|
|
mode=0755
|
|
notify:
|
|
- Reload proxyhttpd
|
|
tags:
|
|
- httpd
|
|
- httpd/website
|
|
- robots
|
|
|
|
- name: And lastly, the robots.txt file
|
|
ansible.builtin.template: >
|
|
src={{item}}
|
|
dest=/srv/web/{{site_name}}-robots.txt
|
|
mode=0644
|
|
owner=root
|
|
group=root
|
|
setype=httpd_sys_content_t
|
|
with_first_found:
|
|
- robots/{{site_name}}-robots.txt
|
|
- robots/robots.txt
|
|
notify:
|
|
- Reload proxyhttpd
|
|
tags:
|
|
- httpd
|
|
- httpd/website
|
|
- robots
|