From 38884a1b7c9656a0664cac8ae77a9fcf1b0e6348 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Thu, 6 Apr 2017 20:31:39 +0000 Subject: [PATCH] first cut at using letsencrypt cert for fpaste.org. ticket 5784 --- files/httpd/fpaste.org.conf | 2 ++ playbooks/groups/proxies.yml | 5 +++++ playbooks/include/proxies-websites.yml | 8 ++++++++ 3 files changed, 15 insertions(+) create mode 100644 files/httpd/fpaste.org.conf diff --git a/files/httpd/fpaste.org.conf b/files/httpd/fpaste.org.conf new file mode 100644 index 0000000000..b38b68995a --- /dev/null +++ b/files/httpd/fpaste.org.conf @@ -0,0 +1,2 @@ +RewriteEngine on +RewriteRule ^/\.well-known/(.*) /srv/web/acme-challenge/.well-known/$1 [L] diff --git a/playbooks/groups/proxies.yml b/playbooks/groups/proxies.yml index f5fb7ee24e..d2747821d7 100644 --- a/playbooks/groups/proxies.yml +++ b/playbooks/groups/proxies.yml @@ -23,9 +23,14 @@ when: env == "staging" or "'mirrorlist-proxy' in group_names" } - { role: openvpn/client, when: env != "staging" } + - { role: certbot, + when: inventory_hostname == 'proxy01.phx2.fedoraproject.org' } - apache tasks: + - name: install special fpaste.conf with letsencrypt info + copy: src={{ files }}/files/httpd/fpaste.conf dest=/etc/httpd/conf.d/fpaste.org/fpaste.org.conf + when: inventory_hostname == 'proxy01.phx2.fedoraproject.org' - include: "{{ tasks }}/yumrepos.yml" - include: "{{ tasks }}/2fa_client.yml" - include: "{{ tasks }}/motd.yml" diff --git a/playbooks/include/proxies-websites.yml b/playbooks/include/proxies-websites.yml index 370eddba2b..3946d6a9c4 100644 --- a/playbooks/include/proxies-websites.yml +++ b/playbooks/include/proxies-websites.yml @@ -463,11 +463,19 @@ # # Make a website here so we can redirect it to paste.fedoraproject.org # + - role: httpd/website + name: fpaste.org + server_aliases: + - www.fpaste.org + cert_name: fpaste.org + when: inventory_hostname == 'proxy01.phx2.fedoraproject.org' + - role: httpd/website name: fpaste.org server_aliases: - www.fpaste.org cert_name: "{{wildcard_cert_name}}" + when: inventory_hostname != 'proxy01.phx2.fedoraproject.org' - role: httpd/website name: koji.fedoraproject.org