Move traefik into its own role
This commit is contained in:
parent
9962d9103f
commit
89ba23719c
9 changed files with 14 additions and 23 deletions
|
@ -1,2 +1,6 @@
|
|||
docker_user:
|
||||
id: 3000
|
||||
name: dockeruser
|
||||
|
||||
docker_compose_file_mask: 0664
|
||||
docker_compose_directory_mask: 0775
|
|
@ -21,4 +21,5 @@
|
|||
docker_users:
|
||||
- "{{ user }}"
|
||||
- docker-cleanup
|
||||
- traefik
|
||||
- docker
|
||||
|
|
|
@ -1,6 +1,3 @@
|
|||
- name: Include docker variables
|
||||
include_vars: docker.yml
|
||||
|
||||
- name: Install docker-compose
|
||||
apt:
|
||||
name: docker-compose
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
docker_user:
|
||||
id: 3000
|
||||
name: dockeruser
|
|
@ -1,8 +1,3 @@
|
|||
- name: Include docker variables
|
||||
include_vars: docker.yml
|
||||
|
||||
# Applications
|
||||
|
||||
- name: Install calibre
|
||||
include: calibre.yml
|
||||
|
||||
|
@ -51,9 +46,6 @@
|
|||
- name: Install theorangeone.net
|
||||
include: theorangeone.net.yml
|
||||
|
||||
- name: Install traefik
|
||||
include: traefik.yml
|
||||
|
||||
- name: Install tt-rss
|
||||
include: tt-rss.yml
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
- name: Create traefik directory
|
||||
- name: Create install directory
|
||||
file:
|
||||
path: /opt/traefik
|
||||
state: directory
|
||||
|
@ -6,16 +6,16 @@
|
|||
mode: "{{ docker_compose_directory_mask }}"
|
||||
become: true
|
||||
|
||||
- name: Create traefik config directory
|
||||
- name: Create config directory
|
||||
file:
|
||||
path: /opt/traefik/traefik
|
||||
state: directory
|
||||
mode: "{{ docker_compose_directory_mask }}"
|
||||
become: true
|
||||
|
||||
- name: Install traefik compose file
|
||||
- name: Install compose file
|
||||
template:
|
||||
src: files/traefik/docker-compose.yml
|
||||
src: files/docker-compose.yml
|
||||
dest: /opt/traefik/docker-compose.yml
|
||||
mode: "{{ docker_compose_file_mask }}"
|
||||
owner: "{{ docker_user.name }}"
|
||||
|
@ -23,25 +23,25 @@
|
|||
register: compose_file
|
||||
become: true
|
||||
|
||||
- name: Install traefik config
|
||||
- name: Install config
|
||||
template:
|
||||
src: files/traefik/traefik.yml
|
||||
src: files/traefik.yml
|
||||
dest: /opt/traefik/traefik/traefik.yml
|
||||
mode: "{{ docker_compose_file_mask }}"
|
||||
owner: "{{ docker_user.name }}"
|
||||
register: config_file
|
||||
become: true
|
||||
|
||||
- name: Install traefik file provider
|
||||
- name: Install file provider
|
||||
template:
|
||||
src: files/traefik/file-provider.yml
|
||||
src: files/file-provider.yml
|
||||
dest: /opt/traefik/traefik/file-provider.yml
|
||||
mode: "{{ docker_compose_file_mask }}"
|
||||
owner: "{{ docker_user.name }}"
|
||||
register: file_provider
|
||||
become: true
|
||||
|
||||
- name: Cycle traefik container
|
||||
- name: Cycle container
|
||||
docker_compose:
|
||||
project_src: /opt/traefik
|
||||
pull: true
|
Loading…
Reference in a new issue