This commit is contained in:
Robert Baker
2019-02-01 16:28:39 -07:00
parent 73242d45b0
commit 265132e772
4 changed files with 6 additions and 190 deletions

View File

@@ -22,12 +22,6 @@
- name: 'Including cron job'
include_tasks: '/opt/plexguide/containers/_core.yml'
# MIGRATIONS (REMOVE SECTION ON MARCH 1st) #############################################################
- name: 'Check for old volumes'
stat:
path: '{{path.stdout}}/{{pgrole}}'
register: oldcheck
# LABELS ######################################################################
- name: 'Adding Traefik'
set_fact:
@@ -99,38 +93,3 @@
- '{{pgrole}}'
state: started
labels: '{{pg_labels}}'
- name: 'Wait 6 Seconds'
wait_for:
timeout: 6
- name: Stop Container
docker_container:
name: '{{pgrole}}'
state: stopped
# ENDING FOR HANDBRAKE ###########################################################
# - name: 'Waiting for {{pgrole}} to initialize'
# wait_for:
# path: '/opt/appdata/{{pgrole}}/core.conf'
# state: present
- name: 'Configuring {{pgrole}} for first time use'
block:
- name: 'Stopping {{pgrole}}'
docker_container:
name: '{{pgrole}}'
state: stopped
# - name: Setting plugins directory
# lineinfile:
# path: '/opt/appdata/{{pgrole}}/core.conf'
# regexp: '"plugins_location"'
# line: '"plugins_location": "/config/plugins",'
# state: present
- name: Restart Container
docker_container:
name: '{{pgrole}}'
state: started

View File

@@ -22,12 +22,6 @@
- name: 'Including cron job'
include_tasks: '/opt/plexguide/containers/_core.yml'
# MIGRATIONS (REMOVE SECTION ON MARCH 1st) #############################################################
- name: 'Check for old volumes'
stat:
path: '{{path.stdout}}/{{pgrole}}'
register: oldcheck
# LABELS ######################################################################
- name: 'Adding Traefik'
set_fact:
@@ -99,38 +93,3 @@
- '{{pgrole}}'
state: started
labels: '{{pg_labels}}'
- name: 'Wait 6 Seconds'
wait_for:
timeout: 6
- name: Stop Container
docker_container:
name: '{{pgrole}}'
state: stopped
# ENDING FOR HANDBRAKE ###########################################################
# - name: 'Waiting for {{pgrole}} to initialize'
# wait_for:
# path: '/opt/appdata/{{pgrole}}/core.conf'
# state: present
- name: 'Configuring {{pgrole}} for first time use'
block:
- name: 'Stopping {{pgrole}}'
docker_container:
name: '{{pgrole}}'
state: stopped
# - name: Setting plugins directory
# lineinfile:
# path: '/opt/appdata/{{pgrole}}/core.conf'
# regexp: '"plugins_location"'
# line: '"plugins_location": "/config/plugins",'
# state: present
- name: Restart Container
docker_container:
name: '{{pgrole}}'
state: started

View File

@@ -26,22 +26,8 @@
- name: 'Including cron job'
include_tasks: '/opt/plexguide/containers/_core.yml'
# MIGRATIONS (REMOVE SECTION ON MARCH 1st) #############################################################
- name: 'Check for old volumes'
stat:
path: '{{path.stdout}}/{{pgrole}}'
register: oldcheck
- name: 'Migrations'
block:
- name: 'Creating new downloads location'
command: 'mkdir -p {{path.stdout}}/downloads/{{pgrole}}'
- name: 'Chown download folder'
shell: 'chown -R 1000:1000 {{path.stdout}}/downloads/{{pgrole}}/'
- name: 'Chmod download folder'
shell: 'chmod -R 775 {{path.stdout}}/downloads/{{pgrole}}/'
- name: 'Including plugins'
include_tasks: '/opt/plexguide/containers/_plugins.yml'
- name: 'Ini Check'
stat:
@@ -74,22 +60,6 @@
GID: 1000
# MAIN DEPLOYMENT #############################################################
- name: 'Create scripts directory for {{pgrole}}'
file:
path: /opt/appdata/{{pgrole}}/scripts
state: directory
owner: 1000
group: 1000
mode: 0755
# - name: 'Create plugins directory for {{pgrole}}'
# file:
# path: /opt/appdata/{{pgrole}}/plugins
# state: directory
# owner: 1000
# group: 1000
# mode: 0755
- name: 'Deploying {{pgrole}}'
docker_container:
name: '{{pgrole}}'
@@ -106,40 +76,3 @@
- '{{pgrole}}'
state: started
labels: '{{pg_labels}}'
- name: 'Wait 6 Seconds'
wait_for:
timeout: 6
- name: Stop Container
docker_container:
name: '{{pgrole}}'
state: stopped
# ENDING FOR JDOWNLOADER2 ###########################################################
# - name: 'Waiting for {{pgrole}} to initialize'
# wait_for:
# path: '/opt/appdata/{{pgrole}}/core.conf'
# state: present
- name: 'Configuring {{pgrole}} for first time use'
block:
- name: 'Stopping {{pgrole}}'
docker_container:
name: '{{pgrole}}'
state: stopped
# - name: Setting plugins directory
# lineinfile:
# path: '/opt/appdata/{{pgrole}}/core.conf'
# regexp: '"plugins_location"'
# line: '"plugins_location": "/config/plugins",'
# state: present
- name: Restart Container
docker_container:
name: '{{pgrole}}'
state: started
when: not inicheck.stat.exists

View File

@@ -24,11 +24,6 @@
- name: 'Including cron job'
include_tasks: '/opt/plexguide/containers/_core.yml'
- name: 'Ini Check'
stat:
path: /opt/appdata/{{pgrole}}/core.conf
register: inicheck
# LABELS ######################################################################
- name: 'Adding Traefik'
set_fact:
@@ -76,33 +71,3 @@
- '{{pgrole}}'
state: started
labels: '{{pg_labels}}'
- name: 'Wait 7 Seconds'
wait_for:
timeout: 7
- name: Stop Container
docker_container:
name: '{{pgrole}}'
state: stopped
# ENDING FOR JDOWNLOADER2 ###########################################################
# - name: 'Waiting for {{pgrole}} to initialize'
# wait_for:
# path: '/opt/appdata/{{pgrole}}/core.conf'
# state: present
- name: 'Configuring {{pgrole}} for first time use'
block:
- name: 'Stopping {{pgrole}}'
docker_container:
name: '{{pgrole}}'
state: stopped
- name: Restart Container
docker_container:
name: '{{pgrole}}'
state: started
when: not inicheck.stat.exists