Added Frigate
This commit is contained in:
1 parent
a1d91c7a16
commit
2b80cc95c0
9 files changed
+493
-2
No files matched your search
@@ -0,0 +1,66 @@
|
||||
- name: Stop Frigate
|
||||
ansible.builtin.import_playbook: stop.yaml
|
||||
|
||||
- name: Uninstall Frigate
|
||||
hosts: Barad-dur
|
||||
tasks:
|
||||
- name: Remove Nginx config file for Frigate
|
||||
become: true
|
||||
ansible.builtin.file:
|
||||
path: /data/nginx-config/frigate.conf
|
||||
state: absent
|
||||
|
||||
- name: Remove Frigate config Docker volume
|
||||
community.docker.docker_volume:
|
||||
volume_name: frigate-config
|
||||
state: absent
|
||||
- name: Remove Frigate config Docker volume directory
|
||||
become: true
|
||||
ansible.builtin.file:
|
||||
path: /data/frigate-config
|
||||
state: absent
|
||||
- name: Remove Frigate media Docker volume
|
||||
community.docker.docker_volume:
|
||||
volume_name: frigate-media
|
||||
state: absent
|
||||
- name: Remove Frigate media Docker volume directory
|
||||
become: true
|
||||
ansible.builtin.file:
|
||||
path: /mnt/nvr_storage/frigate
|
||||
state: absent
|
||||
|
||||
- name: Read homelab config
|
||||
ansible.builtin.slurp:
|
||||
src: '{{ansible_user_dir}}/.homelab.json'
|
||||
register: homelab_config_file
|
||||
- name: Set homelab_config variable
|
||||
ansible.builtin.set_fact:
|
||||
homelab_config: '{{homelab_config_file.content|b64decode|from_json}}'
|
||||
|
||||
- name: Delete from Postgres table service_data
|
||||
community.postgresql.postgresql_query:
|
||||
login_host: '{{homelab_config.database.host}}'
|
||||
login_user: '{{homelab_config.database.user}}'
|
||||
login_password: '{{homelab_config.database.password}}'
|
||||
db: '{{homelab_config.database.name}}'
|
||||
query: 'DELETE FROM service_data WHERE service = %s;'
|
||||
positional_args:
|
||||
- frigate
|
||||
- name: Delete from Postgres table service_port
|
||||
community.postgresql.postgresql_query:
|
||||
login_host: '{{homelab_config.database.host}}'
|
||||
login_user: '{{homelab_config.database.user}}'
|
||||
login_password: '{{homelab_config.database.password}}'
|
||||
db: '{{homelab_config.database.name}}'
|
||||
query: 'DELETE FROM service_port WHERE service = %s;'
|
||||
positional_args:
|
||||
- frigate
|
||||
- name: Delete from Postgres table service
|
||||
community.postgresql.postgresql_query:
|
||||
login_host: '{{homelab_config.database.host}}'
|
||||
login_user: '{{homelab_config.database.user}}'
|
||||
login_password: '{{homelab_config.database.password}}'
|
||||
db: '{{homelab_config.database.name}}'
|
||||
query: 'DELETE FROM service WHERE name = %s;'
|
||||
positional_args:
|
||||
- frigate
|
||||
Reference in new issue
Block a user