-
Notifications
You must be signed in to change notification settings - Fork 253
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor download folders and plugins
- Loading branch information
Robert Baker
committed
Jan 28, 2019
1 parent
c9771d6
commit f4171e3
Showing
6 changed files
with
71 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
- name: Creating download paths | ||
file: 'path={{item}} state=directory mode=0775 owner=1000 group=1000' | ||
with_items: | ||
- '{{path.stdout}}/downloads/{{pgrole}}' | ||
- '{{path.stdout}}/downloads/{{pgrole}}/tv' | ||
- '{{path.stdout}}/downloads/{{pgrole}}/movies' | ||
- '{{path.stdout}}/downloads/{{pgrole}}/music' | ||
- '{{path.stdout}}/downloads/{{pgrole}}/ebooks' | ||
- '{{path.stdout}}/downloads/{{pgrole}}/abooks' | ||
|
||
- name: Creating incomplete paths | ||
file: 'path={{item}} state=directory mode=0775 owner=1000 group=1000' | ||
with_items: | ||
- '{{path.stdout}}/incomplete/{{pgrole}}' | ||
- '{{path.stdout}}/incomplete/{{pgrole}}/tv' | ||
- '{{path.stdout}}/incomplete/{{pgrole}}/movies' | ||
- '{{path.stdout}}/incomplete/{{pgrole}}/music' | ||
- '{{path.stdout}}/incomplete/{{pgrole}}/ebooks' | ||
- '{{path.stdout}}/incomplete/{{pgrole}}/abooks' | ||
when: incomplete.stdout | length == 0 | ||
|
||
- name: Creating incomplete paths | ||
file: 'path={{item}} state=directory mode=0775 owner=1000 group=1000' | ||
with_items: | ||
- '{{incomplete.stdout}}/{{pgrole}}' | ||
- '{{incomplete.stdout}}/{{pgrole}}/tv' | ||
- '{{incomplete.stdout}}/{{pgrole}}/movies' | ||
- '{{incomplete.stdout}}/{{pgrole}}/music' | ||
- '{{incomplete.stdout}}/{{pgrole}}/ebooks' | ||
- '{{incomplete.stdout}}/{{pgrole}}/abooks' | ||
when: incomplete.stdout | length > 0 | ||
ignore_errors: yes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
- name: Creating scripts and plugins paths | ||
file: 'path={{item}} state=directory mode=0775 owner=1000 group=1000' | ||
with_items: | ||
- '/opt/appdata/{{pgrole}}/scripts' | ||
- '/opt/appdata/{{pgrole}}/plugins' | ||
|
||
- name: 'Check if Templates Exist for {{pgrole}}' | ||
stat: | ||
path: './templates/{{pgrole}}' | ||
register: copycheck | ||
|
||
- name: 'Copying Scripts & Plugins' | ||
copy: | ||
src: ./templates/{{pgrole}} | ||
dest: /opt/appdata | ||
directory_mode: yes | ||
force: yes | ||
owner: 1000 | ||
group: 1000 | ||
mode: 0755 | ||
when: copycheck.stat.exists |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters