diff --git a/roles/hopglass-frontend/meta/main.yml b/roles/hopglass-frontend/meta/main.yml new file mode 100644 index 0000000..8b662c9 --- /dev/null +++ b/roles/hopglass-frontend/meta/main.yml @@ -0,0 +1,3 @@ +--- +dependencies: + - role: nginx diff --git a/roles/hopglass-frontend/tasks/install-hopglass.yml b/roles/hopglass-frontend/tasks/install-hopglass.yml index 3493ac8..0792d6b 100644 --- a/roles/hopglass-frontend/tasks/install-hopglass.yml +++ b/roles/hopglass-frontend/tasks/install-hopglass.yml @@ -19,14 +19,15 @@ - name: template nginx site template: src: nginx-site.j2 - dest: /etc/nginx/conf.d/hopglass.conf - register: nginx + dest: /etc/nginx/sites-available/hopglass + notify: reload nginx -- name: reload nginx - service: - name: nginx - state: reloaded - when: nginx.changed +- name: enable site + file: + src: ../sites-available/hopglass + dest: /etc/nginx/sites-enabled/hopglass + state: link + notify: reload nginx - name: template make-hopglass-frontend template: diff --git a/roles/hopglass-frontend/templates/hopglass-config.j2 b/roles/hopglass-frontend/templates/hopglass-config.j2 index 43b60f4..c32b8a0 100644 --- a/roles/hopglass-frontend/templates/hopglass-config.j2 +++ b/roles/hopglass-frontend/templates/hopglass-config.j2 @@ -25,7 +25,7 @@ "url": "https://stamen-tiles-{s}.a.ssl.fastly.net/toner-lite/{z}/{x}/{y}.png", "config": { "maxZoom": 20, - "attribution": "Map tiles by Stamen Design, CC BY 3.0 — Map data © OpenStreetMap" + "attribution": "Map tiles by Stamen Design, CC BY 3.0 — Map data © OpenStreetMap" } } ],