Make sure directories exist

This commit is contained in:
Lukáš Kucharczyk 2021-04-26 22:35:59 +02:00
parent 50ffe15dcd
commit 58fd1aa430
No known key found for this signature in database
GPG Key ID: 65524498C0196B64
2 changed files with 25 additions and 3 deletions

View File

@ -1,10 +1,19 @@
- name: run jellyfin container
- name: ensure directories exist
file:
path: "{{ item }}"
state: directory
mode: '0755'
loop:
- "{{ data_folder }}/jellyfin"
- "{{ media.tv }}"
- "{{ media.movies }}"
- name: run container
docker_container:
name: 'jellyfin'
image: linuxserver/jellyfin
volumes:
- "{{ data_folder }}/jellyfin:/config"
- "{{ media.tv }}:/data/tvshows"
- "{{ media.tv }}:/data/tv"
- "{{ media.movies }}:/data/movies"
ports:
- "8096:8096"

View File

@ -1,8 +1,21 @@
- name: run nginx container
- name: ensure directories exist
file:
path: "{{ item }}"
state: directory
mode: '0755'
loop:
- "{{ nginx_confd_folder }}"
- name: copy .conf file
template:
src: nginx.conf.j2
dest: "{{ data_folder }}/nginx/nginx.conf"
mode: '0755'
- name: run container
docker_container:
name: 'nginx'
image: nginx
volumes:
- "{{ data_folder }}/nginx/nginx.conf:/etc/nginx/nginx.conf"
- "{{ nginx_confd_folder }}:/etc/nginx/conf.d"
ports:
- "80:80"