Migrate gitweb

This commit is contained in:
Salt 2020-02-20 05:29:27 -06:00
parent f2237a8e00
commit 3ab2f9b425

View File

@ -14,11 +14,9 @@
git: git:
repo: "{{ gitweb_repo }}" repo: "{{ gitweb_repo }}"
dest: "{{ gitweb_webroot }}" dest: "{{ gitweb_webroot }}"
- name: Register certificates - name: Copy over virtual host configs
block:
- name: Configure insecure virtual host configs
template: template:
src: apache2-vhost.conf src: apache2-vhost-ssl.conf
dest: "/etc/apache2/sites-enabled/{{ gitweb_url }}.conf" dest: "/etc/apache2/sites-enabled/{{ gitweb_url }}.conf"
- name: Generate certificate - name: Generate certificate
include_role: include_role:
@ -26,16 +24,8 @@
vars: vars:
website_url: "{{ gitweb_url }}" website_url: "{{ gitweb_url }}"
website_webroot: "{{ gitweb_webroot }}" website_webroot: "{{ gitweb_webroot }}"
- name: Secure Apache
block:
# If we copied over http-only configs before, they get oblooterated now
- name: Copy over virtual host configs
template:
src: apache2-vhost-ssl.conf
dest: "/etc/apache2/sites-enabled/{{ gitweb_url }}.conf"
- name: Reload Apache - name: Reload Apache
service: service:
name: apache2 name: apache2
state: reloaded state: reloaded
enabled: true
become: yes become: yes