mirror of
https://github.com/davestephens/ansible-nas
synced 2025-01-13 12:08:53 +00:00
4960286632
freshrss, get_iplayer, gitlab, glances, gotify, guacamole, healthchecks.io
33 lines
1.1 KiB
YAML
33 lines
1.1 KiB
YAML
---
|
|
- name: Start get_iplayer
|
|
block:
|
|
- name: Create get_iplayer Directories
|
|
ansible.builtin.file:
|
|
path: "{{ item }}"
|
|
state: directory
|
|
with_items:
|
|
- "{{ get_iplayer_config_directory }}"
|
|
- "{{ get_iplayer_download_directory }}"
|
|
|
|
- name: Create get_iplayer Docker Container
|
|
community.docker.docker_container:
|
|
container_default_behavior: no_defaults
|
|
name: "{{ get_iplayer_container_name }}"
|
|
image: "{{ get_iplayer_image_name }}:{{ get_iplayer_image_version }}"
|
|
pull: true
|
|
volumes:
|
|
- "{{ get_iplayer_config_directory }}:/root/.get_iplayer:rw"
|
|
- "{{ get_iplayer_download_directory }}:/root/output:rw"
|
|
ports:
|
|
- "{{ get_iplayer_port }}:8181"
|
|
restart_policy: unless-stopped
|
|
memory: "{{ get_iplayer_memory }}"
|
|
when: get_iplayer_enabled is true
|
|
|
|
- name: Stop get_iplayer
|
|
block:
|
|
- name: Stop get_iplayer
|
|
community.docker.docker_container:
|
|
name: "{{ get_iplayer_container_name }}"
|
|
state: absent
|
|
when: get_iplayer_enabled is false
|