Skip to content

Commit

Permalink
Remove Alpine variables, add OpenBooks
Browse files Browse the repository at this point in the history
  • Loading branch information
notthebee committed Nov 12, 2021
1 parent 2cd4b3a commit 5655bd1
Show file tree
Hide file tree
Showing 15 changed files with 65 additions and 62 deletions.
2 changes: 2 additions & 0 deletions group_vars/all/vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ enable_sonarr: true

enable_radarr: true

enable_openbooks: true

enable_jackett: true

enable_deluge: true
Expand Down
4 changes: 1 addition & 3 deletions roles/containers/deconz/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,4 @@ dashboard_url: "http://deconz.box/"

homer_category: smarthome

dashboard_name: "Phoscon-GW"

upstream_port: "8085"
dashboard_name: "Phoscon-GW"
4 changes: 1 addition & 3 deletions roles/containers/deluge/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,4 @@ container_name: deluge

dashboard_url: "http://deluge.box"

homer_category: media

upstream_port: "8112"
homer_category: media
10 changes: 10 additions & 0 deletions roles/containers/openbooks/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
container_name: openbooks

dashboard_url: "http://openbooks.box/"

health_url: "http://{{ ansible_default_ipv4.address }}:3000/http://openbooks.box"

homer_category: media

dashboard_name: "OpenBooks"
25 changes: 25 additions & 0 deletions roles/containers/openbooks/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
- name: Make sure the {{ container_name }} container is created and running
docker_container:
name: "{{ container_name }}"
image: "evanbuss/openbooks"
pull: yes
state: 'started'
labels:
"flame.type": "application"
"flame.name": "{{ dashboard_name }}"
"flame.url": "{{ dashboard_url }}"
"flame.icon": "custom"
volumes:
- "{{ mergerfs_root }}/Downloads/Books:/books"
env:
"TZ": "{{ timezone }}"
restart_policy: unless-stopped

- name: Add {{ container_name }} to the SWAG network (reverse-proxy)
docker_network:
name: swag_network
connected:
- "{{ container_name }}"
appends: yes
when: enable_swag
4 changes: 1 addition & 3 deletions roles/containers/photoprism/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,4 @@ dashboard_url: "http://photoprism.box"

homer_category: services

dashboard_name: "PhotoPrism"

upstream_port: "2342"
dashboard_name: "PhotoPrism"
4 changes: 1 addition & 3 deletions roles/containers/radarr/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,4 @@ container_name: radarr

dashboard_url: "http://radarr.box/"

homer_category: media

upstream_port: "7878"
homer_category: media
16 changes: 16 additions & 0 deletions roles/containers/swag/templates/openbooks.subdomain.conf.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
server {
{% include "common/internal.j2" %}
{% include "common/params.j2" %}
server_name {{ swag_urls['openbooks'] }};

location / {
{% include "common/cors.j2" %}
include /config/nginx/proxy.conf;
include /config/nginx/resolver.conf;
set $upstream_app openbooks;
set $upstream_port 80;
set $upstream_proto http;
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
proxy_buffering off;
}
}
7 changes: 0 additions & 7 deletions roles/docker/vars/Alpine.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
---
extra_packages:
- fish
- iperf3
- speedtest-cli
- htop
- stow
- git
Expand Down
26 changes: 0 additions & 26 deletions roles/essential/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
---
- name: Include OS-specific variables
include_vars: "{{ ansible_facts['os_family'] }}.yml"

- name: Ubuntu specific tasks
become: yes
when: ansible_facts['distribution'] == 'Ubuntu'
Expand Down Expand Up @@ -41,27 +38,6 @@
shell:
cmd: apt update && apt upgrade -y

- name: Alpine specific tasks
become: yes
when: ansible_facts['distribution'] == 'Alpine'
block:
- name: Enable community repository
replace:
path: /etc/apk/repositories
regexp: '^#(http.*community)'
replace: '\1'

- name: Update and upgrade apk packages
apk:
upgrade: yes
update_cache: yes

- name: Set the default shell
replace:
path: /etc/passwd
regexp: "/home/{{ username }}:/bin/ash"
replace: "/home/{{ username }}:{{ shell }}"

- name: Check if reboot required
stat:
path: /var/run/reboot-required
Expand Down Expand Up @@ -122,8 +98,6 @@
group: root
mode: '0644'



- name: Suppress login messages
file:
name: /home/{{ username }}/.hushlogin
Expand Down
16 changes: 0 additions & 16 deletions roles/essential/vars/Alpine.yml

This file was deleted.

Binary file added roles/homer/files/icons/openbooks.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,11 @@
- containers
when: enable_wireguard | default(False)

- role: containers/openbooks
tags:
- openbooks
- containers
when: enable_openbooks | default(False)

- role: containers/deconz
tags:
Expand Down
2 changes: 1 addition & 1 deletion tasks/user.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
name: "sambashare"
state: present


- name: Append the samba group
when: enable_samba | default(False)
become: yes
Expand Down Expand Up @@ -66,3 +65,4 @@
shell: /sbin/nologin
with_items: "{{ additional_users }}"
when: additional_users is defined
no_log: true

0 comments on commit 5655bd1

Please sign in to comment.