- name: Install front-packages apt: name: "{{ item }}" state: present with_items: - libcapture-tiny-perl - libcommon-sense-perl - libdata-dumper-simple-perl - libdbd-pg-perl - libdbi-perl - libdigest-perl - libgd-perl - libgeo-ip-perl - libhtml-parser-perl - libhtml-template-perl - libjson-perl - libjson-xs-perl - libnetaddr-ip-perl - libnet-cidr-perl - libnet-ip-perl - libnet-oping-perl - libnet-rawip-perl - libsnmp-perl - libsocket6-perl - libsocket-perl - libswitch-perl - libtimedate-perl - perl - perl-base - perl-modules - libfreezethaw-perl - apache2 - libxml2-dev - build-essential - cpanminus - apt-transport-https - name: Add packagecloud.io Varnish apt key. apt_key: url: https://packagecloud.io/varnishcache/varnish5/gpgkey state: present - 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: 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: 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 - cpanm: name: AnyEvent::InfluxDB