Browse Source

website: use website-service-group instead of website-host

Fixes: main/infrastructure#240
keep-around/78819527a26db06dd2cbb45f56ade4d881905cb0
Loïc Dachary 11 months ago
committed by Loic Dachary
parent
commit
78819527a2
Signed by: dachary GPG Key ID: 992D23B392F9E4F2
  1. 2
      inventory/host_vars/website-host/website.yml
  2. 3
      inventory/services.yml
  3. 4
      playbooks/website/inventory/services.yml
  4. 2
      playbooks/website/roles/website/templates/update-website.sh.j2
  5. 20
      playbooks/website/website-playbook.yml

2
inventory/host_vars/website-host/website.yml

@ -1,2 +0,0 @@
---
website_vhost_fqdn: "{{ domain }}"

3
inventory/services.yml

@ -115,8 +115,7 @@ forum-service-hosts:
essential-service-group:
website-service-group:
hosts:
website-host:
hosts: {}
website-service-hosts:
children:

4
playbooks/website/inventory/services.yml

@ -2,3 +2,7 @@
icinga-service-group:
hosts:
icinga-host:
website-service-group:
hosts:
website-host:

2
playbooks/website/roles/website/templates/update-website.sh.j2

@ -12,5 +12,5 @@ git fetch
git pull
git submodule sync
git submodule update --init --recursive
hugo --baseURL="https://{{ website_vhost_fqdn }}/"
hugo --baseURL="https://{{ domain }}/"
rsync -av --delete public/ /usr/share/nginx/html/

20
playbooks/website/website-playbook.yml

@ -1,6 +1,6 @@
---
- name: install website
hosts: website-host
hosts: website-service-group
become: true
pre_tasks:
@ -30,35 +30,35 @@
- role: monitor_http_vhost
http_vhost_https: true
http_vhost_name: Website
http_vhost_fqdn: "{{ website_vhost_fqdn }}"
http_vhost_fqdn: "{{ domain }}"
http_vhost_uri: "/"
http_vhost_string: "Enough"
# separate plays because of https://github.com/ansible/ansible/issues/50278
- name: install certificate on {{ website_vhost_fqdn }}
hosts: website-host
- name: install certificate on {{ domain }}
hosts: website-service-group
become: true
roles:
- role: enough-nginx
vars:
enough_nginx_fqdn: "{{ website_vhost_fqdn }}"
enough_nginx_fqdn: "{{ domain }}"
- role: certificate
vars:
certificate_fqdn: "{{ website_vhost_fqdn }}"
certificate_fqdn: "{{ domain }}"
certificate_installer: nginx
- name: install certificate on www.{{ website_vhost_fqdn }}
hosts: website-host
- name: install certificate on www.{{ domain }}
hosts: website-service-group
become: true
roles:
- role: enough-nginx
vars:
enough_nginx_fqdn: "www.{{ website_vhost_fqdn }}"
enough_nginx_fqdn: "www.{{ domain }}"
- role: certificate
vars:
certificate_fqdn: "www.{{ website_vhost_fqdn }}"
certificate_fqdn: "www.{{ domain }}"
certificate_installer: nginx
Loading…
Cancel
Save