Browse Source

gluon-collector is now starting and working behind nginx

Till Klocke 9 years ago
parent
commit
01f557ede5

+ 1 - 1
roles/internal/ffdo.gluon-collector/defaults/main.yml

@@ -2,7 +2,7 @@
 # defaults file for ffdo.gluon-collector
 
 gluon_collector_http_port: 8080
-gluon_collector_http_address: "[::1]"
+gluon_collector_http_address: "127.0.0.1"
 gluon_collector_store_type: bolt
 gluon_collector_base_path: /opt/gluon-collector
 gluon_collector_db_path: "{{gluon_collector_base_path}}/collector.db"

+ 6 - 1
roles/internal/ffdo.gluon-collector/tasks/main.yml

@@ -29,7 +29,7 @@
 - name: Create gluon-collector configuration
   template: 
     src: config.j2
-    dest: "{{gluon_collector_base_path}}/gluon-collector.yml"
+    dest: "/etc/gluon-collector.yaml"
     owner: "{{gluon_collector_user}}"
     group: "{{gluon_collector_group}}"
     mode: "u=rw,g=rw,o=r"
@@ -48,10 +48,15 @@
     mode: "u=rwx,g=rw,o=r"
 
 - name: Generate systemd service
+  register: gluon_collector_systemd
   template:
     src: systemd.j2
     dest: /etc/systemd/system/gluon-collector.service
 
+- name: Systemd deamon-reload
+  when: gluon_collector_systemd|changed
+  shell: systemctl daemon-reload
+
 - name: Ensure gluon-collector is started and enabled via systemd
   service:
     name: gluon-collector

+ 1 - 1
roles/internal/ffdo.gluon-collector/templates/systemd.j2

@@ -2,7 +2,7 @@
 Description=gluon-collector
 
 [Service]
-ExecStart={{gluon_collector_base_path}}/gluon-collector -config {{gluon_collector_config_path}}
+ExecStart={{gluon_collector_base_path}}/gluon-collector -config /etc/gluon-collector.yaml
 Restart=on-failure
 User={{gluon_collector_user}}