diff options
author | Ole Mathias Aa. Heggem <olemathias.aa.heggem@gmail.com> | 2019-10-30 23:47:38 +0100 |
---|---|---|
committer | Ole Mathias Aa. Heggem <olemathias.aa.heggem@gmail.com> | 2019-10-30 23:47:38 +0100 |
commit | eef0d38d7602ff57a4a935937b55e11f2295968d (patch) | |
tree | 3b51a9ecfe97a57d4bb9cdfc47b1f6a6e72ff32f /ansible | |
parent | a5cfd65181fcb28e5b1de5a738baad13ee8ab354 (diff) |
Add basic ubuntu/debian10 support in ansible
Diffstat (limited to 'ansible')
-rw-r--r-- | ansible/roles/influx/tasks/main.yml | 2 | ||||
-rw-r--r-- | ansible/roles/postgres/tasks/main.yml | 4 | ||||
-rw-r--r-- | ansible/roles/web/files/varnish.service | 2 | ||||
-rw-r--r-- | ansible/roles/web/tasks/main.yml | 47 |
4 files changed, 25 insertions, 30 deletions
diff --git a/ansible/roles/influx/tasks/main.yml b/ansible/roles/influx/tasks/main.yml index cb3a784..2f31b85 100644 --- a/ansible/roles/influx/tasks/main.yml +++ b/ansible/roles/influx/tasks/main.yml @@ -7,7 +7,7 @@ apt_key: url=https://repos.influxdata.com/influxdb.key state=present - name: Add InfluxDB repository - apt_repository: repo='deb https://repos.influxdata.com/debian jessie stable' state=present + apt_repository: repo='deb https://repos.influxdata.com/{{ ansible_distribution | lower }} {{ ansible_distribution_release | lower }} stable' state=present - name: Install InfluxDB packages apt: name=influxdb state=present update_cache=yes diff --git a/ansible/roles/postgres/tasks/main.yml b/ansible/roles/postgres/tasks/main.yml index 902eeb9..541a198 100644 --- a/ansible/roles/postgres/tasks/main.yml +++ b/ansible/roles/postgres/tasks/main.yml @@ -5,10 +5,6 @@ apt: name: ['postgresql', 'python-psycopg2', 'sudo'] state: present -- name: Drop postgresql-config - copy: - dest: /etc/postgresql/9.6/main/postgresql.conf - src: postgresql.conf - name: Add db to hosts lineinfile: dest: /etc/hosts diff --git a/ansible/roles/web/files/varnish.service b/ansible/roles/web/files/varnish.service index 82b012f..41e311c 100644 --- a/ansible/roles/web/files/varnish.service +++ b/ansible/roles/web/files/varnish.service @@ -1,3 +1,3 @@ [Service] ExecStart= -ExecStart=/usr/sbin/varnishd -a :80 -T localhost:6082 -f /etc/varnish/default.vcl -S /etc/varnish/secret -s malloc,256m +ExecStart=/usr/sbin/varnishd -a :80 -T localhost:6082 -f /etc/varnish/default.vcl -s default,256m diff --git a/ansible/roles/web/tasks/main.yml b/ansible/roles/web/tasks/main.yml index ddbf74d..2df6f38 100644 --- a/ansible/roles/web/tasks/main.yml +++ b/ansible/roles/web/tasks/main.yml @@ -36,6 +36,29 @@ 'python3-flask'] state: present +- name: Install InfluxDB module + cpanm: + name: AnyEvent::InfluxDB + +- 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: cgid + notify: restart apache + +- name: Enable gondul-config + copy: + 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: Add packagecloud.io Varnish apt key. apt_key: url: https://packagecloud.io/varnishcache/varnish5/gpgkey @@ -73,32 +96,8 @@ 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: cgid - notify: restart apache - -- name: Enable gondul-config - copy: - 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: Install InfluxDB module - cpanm: - name: AnyEvent::InfluxDB - - name: add systemd service file for gondul-template copy: dest: /etc/systemd/system/gondul-template.service src: gondul-template.service notify: restart gondul-template - |