]> birchwood-abbey.net Git - Network.git/commitdiff
Fixed indentation of the Install AgentDVR tasks, and service start.
authorMatt Birkholz <matt@birchwood-abbey.net>
Wed, 31 Dec 2025 03:21:28 +0000 (20:21 -0700)
committerMatt Birkholz <matt@birchwood-abbey.net>
Wed, 31 Dec 2025 03:21:28 +0000 (20:21 -0700)
Restart AgentDVR (and ~systemctl daemon-reload~) when the unit
definition changes.

README.org
roles_t/abbey-dvr/tasks/main.yml
roles_t/abbey-front/handlers/main.yml

index 577c2cac6ce3381126981c32c9f2af2690191c68..752198ee3fbfe2fcdda400c4cb55546bd85a5552 100644 (file)
@@ -2205,48 +2205,55 @@ by =install.sh=.
 #+CAPTION: [[file:roles_t/abbey-dvr/tasks/main.yml][=roles_t/abbey-dvr/tasks/main.yml=]]
 #+BEGIN_SRC conf :tangle roles_t/abbey-dvr/tasks/main.yml
 
-  - name: Install AgentDVR.service.
-    become: yes
-    copy:
-      content: |
-        [Unit]
-        Description=AgentDVR
+- name: Install AgentDVR.service.
+  become: yes
+  copy:
+    content: |
+      [Unit]
+      Description=AgentDVR
 
-        [Service]
-        WorkingDirectory=/home/agentdvr/AgentDVR
-        ExecStart=/home/agentdvr/AgentDVR/Agent
+      [Service]
+      WorkingDirectory=/home/agentdvr/AgentDVR
+      ExecStart=/home/agentdvr/AgentDVR/Agent
 
-        # fix memory management issue with dotnet core
-        Environment="MALLOC_TRIM_THRESHOLD_=100000"
+      # fix memory management issue with dotnet core
+      Environment="MALLOC_TRIM_THRESHOLD_=100000"
 
-        # to query logs using journalctl, set a logical name here
-        SyslogIdentifier=AgentDVR
+      # to query logs using journalctl, set a logical name here
+      SyslogIdentifier=AgentDVR
 
-        User=agentdvr
+      User=agentdvr
 
-        # ensure the service automatically restarts
-        Restart=always
-        # amount of time to wait before restarting the service
-        RestartSec=5
+      # ensure the service automatically restarts
+      Restart=always
+      # amount of time to wait before restarting the service
+      RestartSec=5
 
-        [Install]
-        WantedBy=multi-user.target
-      dest: /etc/systemd/system/AgentDVR.service
+      [Install]
+      WantedBy=multi-user.target
+    dest: /etc/systemd/system/AgentDVR.service
+  notify:
+  - Reload systemd.
+  - Restart AgentDVR.
 
-  - name: Start AgentDVR.service.
-    become: yes
-    systemd:
-      service: AgentDVR
-      state: started
-    when: agentdvr.stat.exists
-    tags: actualizer
+- name: Enable AgentDVR.service.
+  become: yes
+  systemd:
+    service: AgentDVR
+    enabled: yes
+  when: agentdvr.stat.exists
+#+END_SRC
 
-  - name: Enable AgentDVR.service.
-    become: yes
-    systemd:
-      service: AgentDVR
-      enabled: yes
-    when: agentdvr.stat.exists
+#+CAPTION: [[file:roles_t/abbey-front/handlers/main.yml][=roles_t/abbey-front/handlers/main.yml=]]
+#+BEGIN_SRC conf :tangle roles_t/abbey-front/handlers/main.yml
+
+- name: Restart AgentDVR.
+  become: yes
+  systemd:
+    service: AgentDVR
+    state: restarted
+  when: agentdvr.stat.exists
+  tags: actualizer
 #+END_SRC
 
 ** Create AgentDVR Storage
index b7736c9a4cc4dc3e019bcd44214954f7303d3808..bebce069ffc449e7fb9798bde300a39872823873 100644 (file)
       [Install]
       WantedBy=multi-user.target
     dest: /etc/systemd/system/AgentDVR.service
-
-- name: Start AgentDVR.service.
-  become: yes
-  systemd:
-    service: AgentDVR
-    state: started
-  when: agentdvr.stat.exists
-  tags: actualizer
+  notify:
+  - Reload systemd.
+  - Restart AgentDVR.
 
 - name: Enable AgentDVR.service.
   become: yes
index de939e3bc2d8f768380c2252b630a884df906e76..7415a0fb2ed0a9c3604732ad4f326021af6882bf 100644 (file)
 - name: Import root@core's public key.
   become: yes
   command: gpg --import ~/.gnupg-root-pub.pem
+
+- name: Restart AgentDVR.
+  become: yes
+  systemd:
+    service: AgentDVR
+    state: restarted
+  when: agentdvr.stat.exists
+  tags: actualizer