Sfoglia il codice sorgente

update olivetin role

Blaine Story 1 giorno fa
parent
commit
aab5ec9641

+ 6 - 3
roles/olivetin/files/config.yaml_chloe-test → roles/olivetin/files/config.yaml_chloe-test-centos10

@@ -15,7 +15,8 @@ checkForUpdates: false
 actions:
   - title: Restart VPN
     shell: nordvpn c
-    icon: <iconify-icon icon="gala:secure"></iconify-icon>
+    timeout: 10
+    icon: ssh
     popupOnStart: execution-dialog-stdout-only
 
 
@@ -27,16 +28,18 @@ actions:
     popupOnStart: execution-dialog
 
 
-  - title: Restart Application
+  - title: Restart App
     icon: restart
     shell: systemctl restart {{ container }}
+    timeout: 180
     arguments:
       - name: container
-        title: Application name
+        title: App
         choices:
           - value: sickgear
           - value: transmission
           - value: qbittorrent
+          - value: homepage
 
 
   - title: Reboot Server

+ 5 - 0
roles/olivetin/handlers/main.yml

@@ -1,4 +1,9 @@
 ---
+- name: Daemon Reload
+  ansible.builtin.systemd_service:
+    daemon_reload: True
+
+
 - name: Restart OliveTin
   ansible.builtin.systemd_service:
     name: OliveTin

+ 33 - 0
roles/olivetin/tasks/main.yml

@@ -3,6 +3,7 @@
   ansible.builtin.set_fact:
     olivetin: OliveTin_linux_amd64.{{ 'deb' if ansible_os_family == "Debian" else 'rpm' }}
 
+
 - name: Check for existing OliveTin package
   ansible.builtin.stat:
     path: /root/{{ olivetin }}
@@ -29,6 +30,7 @@
   ansible.builtin.dnf:
     name: /root/{{ olivetin }}
     state: present
+    disable_gpg_check: True
   when:
     - ansible_os_family == "RedHat"
 
@@ -43,6 +45,37 @@
   notify: Restart OliveTin
 
 
+- name: Create OliveTin systemd folder (Debian)
+  ansible.builtin.file:
+    path: /etc/systemd/system/OliveTin.service.d
+    state: directory
+    owner: root
+    group: root
+    mode: '0755'
+  when:
+    - ansible_os_family == "Debian"
+
+
+- name: Apply env var workaround (Debian)
+  ansible.builtin.copy:
+    dest: /etc/systemd/system/OliveTin.service.d/debian-fix.conf
+    owner: root
+    group: root
+    mode: '0644'
+    content: |
+             [Service]
+             Environment=HOME=/root
+  when:
+    - ansible_os_family == "Debian"
+  notify:
+    - Daemon Reload
+    - Restart OliveTin
+
+
+- name: Flush handlers
+  ansible.builtin.meta: flush_handlers
+
+
 - name: Start/Enable OliveTin
   ansible.builtin.systemd_service:
     name: OliveTin