aboutsummaryrefslogtreecommitdiffstats
path: root/nms/ansible/roles/nmsfront/tasks
diff options
context:
space:
mode:
Diffstat (limited to 'nms/ansible/roles/nmsfront/tasks')
-rw-r--r--nms/ansible/roles/nmsfront/tasks/main.yml24
1 files changed, 24 insertions, 0 deletions
diff --git a/nms/ansible/roles/nmsfront/tasks/main.yml b/nms/ansible/roles/nmsfront/tasks/main.yml
new file mode 100644
index 0000000..4e9d7b2
--- /dev/null
+++ b/nms/ansible/roles/nmsfront/tasks/main.yml
@@ -0,0 +1,24 @@
+
+ - name: Enable CGI
+ apache2_module: state=present name=cgid
+
+ - name: Remove default apache site
+ file: path=/etc/apache2/sites-enabled/000-default.conf state=absent
+
+ - name: Add NMS site config
+ file: src=/srv/tgmanage/web/etc/apache2/nms.tg16.gathering.org.conf dest=/etc/apache2/sites-enabled/nms.tg16.gathering.org.conf state=link
+
+ - name: "Apache: Don't listen on 80"
+ lineinfile: line="Listen 80" state=absent dest=/etc/apache2/ports.conf
+
+ - name: "Apache: DO listen on 8080"
+ lineinfile: line="Listen 8080" state=present dest=/etc/apache2/ports.conf
+
+ - name: "Varnish: Set up VCL"
+ file: path=/etc/varnish/default.vcl src=/srv/tgmanage/web/etc/varnish/nms.vcl state=link force=true
+
+ - name: "Varnish: Remove default systemd config"
+ lineinfile: line="ExecStart=/usr/sbin/varnishd -a :6081 -T localhost:6082 -f /etc/varnish/default.vcl -S /etc/varnish/secret -s malloc,256m" state=absent dest=/lib/systemd/system/varnish.service
+
+ - name: "Varnish: Add sensible systemd config"
+ lineinfile: line="ExecStart=/usr/sbin/varnishd -f /etc/varnish/default.vcl -s malloc,256m" state=present dest=/lib/systemd/system/varnish.service insertafter="Service"