/
/
/
Ansible role that provisions my storage server.
1---
2# Storage Services Main Tasks
3# Orchestrates media automation and backup services deployment
4
5- name: Display storage services configuration
6 debug:
7 msg: |
8 Storage Services Configuration:
9 - Jellyfin: {{ 'Enabled' if jellyfin_enabled else 'Disabled' }}
10 - Arr Stack: {{ 'Enabled' if arr_stack_enabled else 'Disabled' }}
11 - Calibre Stack: {{ 'Enabled' if calibre_enabled else 'Disabled' }}
12 - Restic Backup: {{ 'Enabled' if restic_backup_server_enabled else 'Disabled' }}
13 - Base Path: {{ storage_base_path }}
14 - Docker Dir: {{ storage_docker_dir }}
15 tags: ['always']
16
17# ==============================================================================
18# PREREQUISITES AND SETUP
19# ==============================================================================
20
21- name: Include prerequisites setup
22 include_tasks: prerequisites.yml
23 tags: ['prerequisites', 'setup']
24
25# ==============================================================================
26# DOCKER NETWORK SETUP
27# ==============================================================================
28
29- name: Create storage docker network
30 community.docker.docker_network:
31 name: "{{ storage_docker_network }}"
32 state: present
33 tags: ['docker', 'network']
34
35# ==============================================================================
36# JELLYFIN MEDIA SERVER
37# ==============================================================================
38
39- name: Deploy Jellyfin media server
40 include_tasks: jellyfin.yml
41 when: jellyfin_enabled
42 tags: ['jellyfin', 'media']
43
44# ==============================================================================
45# ARR STACK (SONARR, RADARR, PROWLARR, READARR + GLUETUN VPN)
46# ==============================================================================
47
48- name: Deploy Arr Stack with VPN
49 include_tasks: arr-stack.yml
50 when: arr_stack_enabled
51 tags: ['arr-stack', 'automation']
52
53# ==============================================================================
54# CALIBRE STACK (CALIBRE + CALIBRE-WEB)
55# ==============================================================================
56
57- name: Deploy Calibre ebook management stack
58 include_tasks: calibre-stack.yml
59 when: calibre_enabled
60 tags: ['calibre', 'books']
61
62# ==============================================================================
63# RESTIC BACKUP SERVER
64# ==============================================================================
65
66- name: Deploy Restic backup server
67 include_tasks: restic-server.yml
68 when: restic_backup_server_enabled
69 tags: ['restic', 'backup']
70
71# ==============================================================================
72# POST-DEPLOYMENT VALIDATION
73# ==============================================================================
74
75- name: Validate storage services deployment
76 include_tasks: validation.yml
77 tags: ['validation', 'health-check']
78
79# ==============================================================================
80# SERVICE STATUS SUMMARY
81# ==============================================================================
82
83- name: Display storage services summary
84 debug:
85 msg: |
86 Storage Services Deployment Complete!
87
88 Services Status:
89 {% if jellyfin_enabled %}
90 - Jellyfin: Running on port {{ jellyfin_host_port }}
91 Access: http://{{ ansible_default_ipv4.address }}:{{ jellyfin_host_port }}
92 {% endif %}
93 {% if arr_stack_enabled %}
94 - Sonarr (TV): Running on port {{ sonarr_host_port }}
95 Access: http://{{ ansible_default_ipv4.address }}:{{ sonarr_host_port }}
96 - Radarr (Movies): Running on port {{ radarr_host_port }}
97 Access: http://{{ ansible_default_ipv4.address }}:{{ radarr_host_port }}
98 - Prowlarr (Indexers): Running on port {{ prowlarr_host_port }}
99 Access: http://{{ ansible_default_ipv4.address }}:{{ prowlarr_host_port }}
100 - Readarr (Books): Running on port {{ readarr_host_port }}
101 Access: http://{{ ansible_default_ipv4.address }}:{{ readarr_host_port }}
102 {% endif %}
103 {% if calibre_enabled %}
104 - Calibre Server: Running on port {{ calibre_server_host_port }}
105 Access: http://{{ ansible_default_ipv4.address }}:{{ calibre_server_host_port }}
106 - Calibre-Web: Running on port {{ calibre_web_host_port }}
107 Access: http://{{ ansible_default_ipv4.address }}:{{ calibre_web_host_port }}
108 {% endif %}
109 {% if restic_backup_server_enabled %}
110 - Restic Backup: Running on port {{ restic_backup_host_port }}
111 Endpoint: http://{{ ansible_default_ipv4.address }}:{{ restic_backup_host_port }}/
112 {% endif %}
113
114 Media Paths:
115 - Storage Base: {{ storage_base_path }}
116 - Docker Configs: {{ storage_docker_dir }}
117 - Downloads: {{ arr_downloads_dir }}
118
119 Next Steps:
120 1. Configure VPN credentials in encrypted vault
121 2. Set up indexers in Prowlarr
122 3. Configure quality profiles in Arr apps
123 4. Add media libraries to Jellyfin
124 5. Import existing books to Calibre
125 tags: ['always']