Migrate gitweb

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

View File

@ -14,28 +14,18 @@
git: git:
repo: "{{ gitweb_repo }}" repo: "{{ gitweb_repo }}"
dest: "{{ gitweb_webroot }}" dest: "{{ gitweb_webroot }}"
- name: Register certificates - name: Copy over virtual host configs
block: template:
- name: Configure insecure virtual host configs src: apache2-vhost-ssl.conf
template: dest: "/etc/apache2/sites-enabled/{{ gitweb_url }}.conf"
src: apache2-vhost.conf - name: Generate certificate
dest: "/etc/apache2/sites-enabled/{{ gitweb_url }}.conf" include_role:
- name: Generate certificate name: https
include_role: vars:
name: https website_url: "{{ gitweb_url }}"
vars: website_webroot: "{{ gitweb_webroot }}"
website_url: "{{ gitweb_url }}" - name: Reload Apache
website_webroot: "{{ gitweb_webroot }}" service:
- name: Secure Apache name: apache2
block: state: reloaded
# 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
service:
name: apache2
state: reloaded
enabled: true
become: yes become: yes