diff options
author | Kristian Lyngstøl <kly@kly.no> | 2018-03-21 10:43:33 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-21 10:43:33 +0100 |
commit | 4eaeb1d7dc6095a2eec1b4711de94f907654547e (patch) | |
tree | 5b4b00409761f44227b9294e0c62f059ab68fae9 /ansible/roles/web/tasks | |
parent | 0016b6612e79cc5b115aae11c7f37ec2a27420e1 (diff) | |
parent | dfc74df8f82d7c295319f3e197cb2d37a8ee6ddd (diff) |
Merge pull request #167 from olemathias/master
Varnish is now installed in the ansible install + chart colors
Diffstat (limited to 'ansible/roles/web/tasks')
-rw-r--r-- | ansible/roles/web/tasks/main.yml | 51 |
1 files changed, 38 insertions, 13 deletions
diff --git a/ansible/roles/web/tasks/main.yml b/ansible/roles/web/tasks/main.yml index 3eb4279..d05c6db 100644 --- a/ansible/roles/web/tasks/main.yml +++ b/ansible/roles/web/tasks/main.yml @@ -36,30 +36,55 @@ - cpanminus - apt-transport-https -- apache2_module: +- name: Add packagecloud.io Varnish apt key. + apt_key: + url: https://packagecloud.io/varnishcache/varnish5/gpgkey state: present - name: cgid - notify: restart apache -- apache2_module: + +- name: Add packagecloud.io Varnish apt repository. + apt_repository: + repo: "deb https://packagecloud.io/varnishcache/varnish5/{{ ansible_distribution | lower }}/ {{ ansible_distribution_release }} main" state: present - name: proxy + +- name: Ensure Varnish is installed. + apt: + name: "varnish" + state: present + +- name: Ensure folder varnish.service.d exists + file: path=/etc/systemd/system/varnish.service.d/ state=directory mode=0755 + +- name: Change varnish service.d + copy: + dest: /etc/systemd/system/varnish.service.d/customexec.conf + src: varnish.service + notify: + - reload systemd + +- name: Copy varnish config + copy: + dest: /etc/varnish/default.vcl + src: varnish.vcl + notify: restart varnish + +- name: Make apache listen on port 8080 + lineinfile: dest=/etc/apache2/ports.conf regexp="^Listen 80" line="Listen 8080" state=present notify: restart apache + - apache2_module: state: present - name: proxy_http + name: cgid notify: restart apache + - name: Enable gondul-config copy: - dest: /etc/apache2/sites-enabled/ - src: gondul.conf + dest: /etc/apache2/sites-enabled/gondul.conf + src: apache-virtualhost.conf notify: restart apache + - command: a2dissite 000-default ignore_errors: true notify: restart apache -- name: Enable gondul-config - copy: - dest: /etc/apache2/sites-enabled/ - src: gondul.conf - notify: restart apache + - cpanm: name: AnyEvent::InfluxDB |