summaryrefslogtreecommitdiff
path: root/roles/phoneassistant/tasks
diff options
context:
space:
mode:
authorElizabeth Hunt <elizabeth@simponic.xyz>2025-01-13 21:24:32 -0800
committerElizabeth Hunt <elizabeth@simponic.xyz>2025-01-13 21:24:32 -0800
commitc0ab7feac52fc00e66417db22b25162130a4e6e3 (patch)
tree91b82c4070cdfd4f2dab4bbac16af0918b54f8af /roles/phoneassistant/tasks
parent040994898b109b3f344b37d1d449eb3b8f58ec53 (diff)
downloadoldinfra-c0ab7feac52fc00e66417db22b25162130a4e6e3.tar.gz
oldinfra-c0ab7feac52fc00e66417db22b25162130a4e6e3.zip
fix create service script for infra and add phoneassistant role
Diffstat (limited to 'roles/phoneassistant/tasks')
-rw-r--r--roles/phoneassistant/tasks/main.yml30
1 files changed, 30 insertions, 0 deletions
diff --git a/roles/phoneassistant/tasks/main.yml b/roles/phoneassistant/tasks/main.yml
new file mode 100644
index 0000000..2e35377
--- /dev/null
+++ b/roles/phoneassistant/tasks/main.yml
@@ -0,0 +1,30 @@
+---
+- name: ensure phoneassistant docker/compose exist
+ file:
+ path: /etc/docker/compose/phoneassistant
+ state: directory
+ owner: root
+ group: root
+ mode: 0700
+
+- name: ensure phoneassistant db exist
+ file:
+ path: /etc/docker/compose/phoneassistant/db
+ state: directory
+ owner: root
+ group: root
+ mode: 0777
+
+- name: build phoneassistant docker-compose.yml.j2
+ template:
+ src: ../templates/docker-compose.yml.j2
+ dest: /etc/docker/compose/phoneassistant/docker-compose.yml
+ owner: root
+ group: root
+ mode: u=rw,g=r,o=r
+
+- name: daemon-reload and enable phoneassistant
+ ansible.builtin.systemd_service:
+ state: restarted
+ enabled: true
+ name: docker-compose@phoneassistant