Skip to content

Commit

Permalink
PreTasks: Renamed subtasks. [ansible]
Browse files Browse the repository at this point in the history
pre tasks
  • Loading branch information
desimaniac committed May 24, 2019
1 parent 61c4022 commit 4bc9988
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 29 deletions.
10 changes: 5 additions & 5 deletions roles/pre_tasks/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#########################################################################
# Title: Cloudbox: Pre-Tasks Role #
# Title: Cloudbox: Pre-Tasks #
# Author(s): desimaniac #
# URL: https://github.com/cloudbox/cloudbox #
# -- #
Expand All @@ -16,12 +16,12 @@
import_tasks: "subtasks/clean_paths.yml"
tags: always

- name: Set Cloudbox vars
import_tasks: "subtasks/vars.yml"
- name: Set Cloudbox Variables
import_tasks: "subtasks/variables.yml"
tags: always

- name: Set Cloudbox role vars
import_tasks: "subtasks/role_vars.yml"
- name: Set Cloudbox Role Variables
import_tasks: "subtasks/role_variables.yml"
tags: always

# Sub-Domain Tasks
Expand Down
2 changes: 1 addition & 1 deletion roles/pre_tasks/tasks/subtasks/add_subdomain.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#########################################################################
# Title: Cloudbox: Pre-Tasks Role - Add Subdomain Task #
# Title: Pre-Tasks: Add Subdomain Task #
# Author(s): desimaniac #
# URL: https://github.com/cloudbox/cloudbox #
# -- #
Expand Down
2 changes: 1 addition & 1 deletion roles/pre_tasks/tasks/subtasks/apt.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#########################################################################
# Title: Pre-Tasks Role - APT Task #
# Title: Pre-Tasks: APT Task #
# Author(s): desimaniac #
# URL: https://github.com/cloudbox/cloudbox #
# -- #
Expand Down
2 changes: 1 addition & 1 deletion roles/pre_tasks/tasks/subtasks/clean_paths.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#########################################################################
# Title: Cloudbox: Pre-Tasks - Clean Paths Task #
# Title: Pre-Tasks: Clean Paths Task #
# Author(s): desimaniac #
# URL: https://github.com/cloudbox/cloudbox #
# -- #
Expand Down
2 changes: 1 addition & 1 deletion roles/pre_tasks/tasks/subtasks/remove_subdomain.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#########################################################################
# Title: Cloudbox: Pre-Tasks Role - Remove Subdomain Task #
# Title: Pre-Tasks: - Remove Subdomain Task #
# Author(s): desimaniac #
# URL: https://github.com/cloudbox/cloudbox #
# -- #
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#########################################################################
# Title: Cloudbox: Pre-Tasks - Variables Task #
# Title: Pre-Tasks: Role Variables Task #
# Author(s): desimaniac #
# URL: https://github.com/cloudbox/cloudbox #
# -- #
Expand All @@ -8,15 +8,15 @@
# GNU General Public License v3.0 #
#########################################################################
---
- name: "Role Vars | Set 'use_nzbs'"
- name: "Role Variables | Set 'use_nzbs'"
set_fact:
use_nzbs: "{{ true if ( (nzbs_downloads_path is defined) | default(false,true) ) else false }}"

- name: "Role Vars | Set 'use_torrents'"
- name: "Role Variables | Set 'use_torrents'"
set_fact:
use_torrents: "{{ true if ( (torrents_downloads_path is defined) | default(false,true) ) else false }}"

- name: "Role Vars | Set 'use_remote'"
- name: "Role Variables | Set 'use_remote'"
set_fact:
use_remote: "{{ true if not(
(rclone is undefined)
Expand All @@ -33,6 +33,6 @@
)
else false }}"

- name: "Role Vars | Set 'use_nvidia'"
- name: "Role Variables | Set 'use_nvidia'"
set_fact:
use_nvidia: "{{ true if ( gpu.nvidia | default(false) ) else false }}"
2 changes: 1 addition & 1 deletion roles/pre_tasks/tasks/subtasks/user.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#########################################################################
# Title: Pre-Tasks Role - User Task #
# Title: Pre-Tasks: User Task #
# Author(s): desimaniac #
# URL: https://github.com/cloudbox/cloudbox #
# -- #
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#########################################################################
# Title: Cloudbox: Pre-Tasks - Variables Task #
# Title: Pre-Tasks: Variables Task #
# Author(s): desimaniac #
# URL: https://github.com/cloudbox/cloudbox #
# -- #
Expand All @@ -9,11 +9,11 @@
#########################################################################
---
# Needed again for cloudbox_mod.
- name: "Vars | Set 'continuous_integration' variable"
- name: "Variables | Set 'continuous_integration' variable"
set_fact:
continuous_integration: "{{ continuous_integration | default(false,true) }}"

- name: "Vars | Set 'cloudflare_enabled' variable"
- name: "Variables | Set 'cloudflare_enabled' variable"
set_fact:
cloudflare_enabled: "{{ true if not(
(cloudflare_api_token is undefined)
Expand All @@ -24,11 +24,11 @@
)
else false }}"

- name: "Vars | Set 'localhost_ip' variable"
- name: "Variables | Set 'localhost_ip' variable"
set_fact:
localhost_ip: "127.0.0.1"

- name: "Vars | Set 'plex_account_enabled' variable"
- name: "Variables | Set 'plex_account_enabled' variable"
set_fact:
plex_account_enabled: "{{ true if not(
(plex is undefined)
Expand All @@ -51,7 +51,7 @@
)
else false }}"

- name: "Vars | Set 'nzbs_downloads_path' variable"
- name: "Variables | Set 'nzbs_downloads_path' variable"
set_fact:
nzbs_downloads_path:
- "{{ downloads.nzbs }}:/downloads/nzbs"
Expand All @@ -69,7 +69,7 @@
(downloads.nzbs | trim | length == 0)
)

- name: "Vars | Set 'torrents_downloads_path' variable"
- name: "Variables | Set 'torrents_downloads_path' variable"
set_fact:
torrents_downloads_path:
- "{{ downloads.torrents }}:/downloads/torrents"
Expand All @@ -88,11 +88,11 @@
)


- name: Vars | Set `suitarr_default_version` variable
- name: Variables | Set 'suitarr_default_version' variable
set_fact:
suitarr_default_version: "unstable"

- name: Vars | Check if 'suitarr.version' was specified
- name: Variables | Check if 'suitarr.version' was specified
set_fact:
suitarr_version_is_specified: "{{ true if not (
(suitarr is undefined)
Expand All @@ -109,7 +109,7 @@
)
else false }}"

- name: Vars | Validate and set proper 'suitarr' key variables
- name: Variables | Validate and set proper 'suitarr' key variables
set_fact:
suitarr_tmp: { version: "{{ (suitarr.version | lower) if (
(suitarr_version_is_specified)
Expand All @@ -120,7 +120,7 @@
)
else (suitarr_default_version) }}" }

- name: Vars | Merge changes back to 'suitarr' key
- name: Variables | Merge changes back to 'suitarr' key
set_fact:
suitarr: "{{ (suitarr_tmp) if (
(suitarr is undefined)
Expand All @@ -131,7 +131,7 @@
)
else ((suitarr) | combine(suitarr_tmp)) }}"

- name: "Vars | Set 'sma_enabled' role tag"
- name: "Variables | Set 'sma_enabled' role tag"
set_fact:
sma_enabled: "{{ true if (
(sickbeard_mp4_automator is defined)
Expand All @@ -140,13 +140,13 @@
)
else false }}"

- name: Vars | Fetch time zone
- name: Variables | Fetch time zone
uri:
url: http://ip-api.com/line?fields=timezone
return_content: yes
register: timezone_response
when: (system.timezone|lower == 'auto') or (not system.timezone)

- name: Vars | Set time zone variable
- name: Variables | Set time zone variable
set_fact:
tz: "{{ (timezone_response.content | trim) if ((system.timezone|lower == 'auto') or (not system.timezone)) else (system.timezone) }}"

0 comments on commit 4bc9988

Please sign in to comment.