#+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