ctucx.git: ansible-configs

My personal ansible roles and playbooks [deprecated in favor of nixos]

commit f63980401462eca00b885efb144da08330c7f8bb
parent 2d9bf27d84ab2e69129d9e415e42236e8199d210
Author: Leah (ctucx) <leah@ctu.cx>
Date: Mon, 22 Feb 2021 11:41:18 +0100

roles/fritzboxExporter: some improvement
4 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/roles/fritzboxExporter/meta/main.yml b/roles/fritzboxExporter/meta/main.yml
@@ -1,5 +1,6 @@
 ---
 
 dependencies:
+  - nginx
   - nginx-handler
   - nftables-handler 
\ No newline at end of file
diff --git a/roles/fritzboxExporter/tasks/install.yml b/roles/fritzboxExporter/tasks/install.yml
@@ -4,16 +4,12 @@
   apk:
     name: fritzbox-exporter
     state: present
-    update_cache: yes
   when: 
     - ansible_distribution == "Alpine" 
-  notify: Restart fritzbox-exporter
 
 - name: "[Archlinux] Install package: fritzbox-exporter"
   pacman:
     name: fritzbox-exporter
     state: present
-    update_cache: yes
   when:
     - ansible_distribution == "Archlinux"
-  notify: Restart fritzbox-exporter-
\ No newline at end of file
diff --git a/roles/fritzboxExporter/tasks/main.yaml b/roles/fritzboxExporter/tasks/main.yaml
@@ -14,6 +14,8 @@
   when:
     - services.fritzboxExporter.enable is defined
     - services.fritzboxExporter.enable is true
+    - services.fritzboxExporter.nginx.enable is defined
+    - services.fritzboxExporter.nginx.enable is true
 
 - include: firewall.yml
   when:
diff --git a/roles/fritzboxExporter/tasks/nginx.yml b/roles/fritzboxExporter/tasks/nginx.yml
@@ -7,6 +7,4 @@
     mode: 0644
     owner: nginx
     group: nginx
-  when: 
-    - services.fritzboxExporter.enable is true
   notify: Restart nginx 
\ No newline at end of file