Skip to content

Commit

Permalink
move vars to host_vars/vars (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
Artur Y authored Jun 18, 2024
1 parent 8189f82 commit 1b35bc2
Show file tree
Hide file tree
Showing 11 changed files with 8 additions and 216 deletions.
6 changes: 5 additions & 1 deletion host_vars/github_ci/vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ system_timezone: "Europe/Amsterdam"
system_user_uid: "4242"
system_user_gid: "4242"

#################################
# docker #
#################################

docker_bridge_network_settings:
network: "docker-network-main"
puid: "{{ system_user_uid }}"
Expand Down Expand Up @@ -58,7 +62,7 @@ duplicati_docker_settings: "{{ docker_bridge_network_settings }}"
duplicati_port: 3009

filebrowser_docker_settings: "{{ docker_bridge_network_settings }}"
storage_filebrowser_port: 3010
filebrowser_port: 3010

glances_docker_settings: "{{ docker_host_network_settings }}"
glances_webui_port: 61208
Expand Down
92 changes: 0 additions & 92 deletions host_vars/pi/vars.yml

This file was deleted.

14 changes: 0 additions & 14 deletions host_vars/vps/vars.yml

This file was deleted.

2 changes: 1 addition & 1 deletion playbook-github-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
tags:
- "zsh"

- role: "docker"
- role: "artyorsh.selfhosted.docker"
tags:
- "docker"

Expand Down
49 changes: 1 addition & 48 deletions playbook-pi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,13 @@
tags:
- "security"

- role: "docker"
- role: "artyorsh.selfhosted.docker"
tags:
- "docker"

- role: "artyorsh.selfhosted.adguardhome"
tags:
- "adguardhome"
vars:
adguardhome_docker_settings: "{{ docker_host_network_settings }}"

- role: "wireguard"
vars:
Expand All @@ -37,39 +35,10 @@
- "storage"

- role: "artyorsh.yams.yams"
vars:
yams_user:
name: "{{ system_user_name }}"
password: "{{ system_user_password }}"

yams_dir:
documents: "{{ storage_smb_share_local_dir }}/Documents"
downloads: "{{ storage_smb_share_local_dir }}/Downloads"
photos: "{{ storage_smb_share_local_dir }}/Photos"
movies: "{{ storage_smb_share_local_dir }}/Movies"
tvshows: "{{ storage_smb_share_local_dir }}/TV"

yams_docker_settings:
network: "media"
puid: "{{ system_user_uid }}"
pgid: "{{ system_user_gid }}"
tz: "{{ system_timezone }}"
tags:
- "media"

- role: "artyorsh.smarthome.smarthome"
vars:
# smarthome_zigbee_coordinator: "/dev/ttyUSB0"

smarthome_user:
name: "{{ system_user_name }}"
password: "{{ system_user_password }}"

smarthome_docker_settings:
network: "home"
puid: "{{ system_user_uid }}"
pgid: "{{ system_user_gid }}"
tz: "{{ system_timezone }}"
tags:
- "smarthome"

Expand All @@ -78,38 +47,22 @@
- "monitoring"

- role: "artyorsh.selfhosted.rss"
vars:
rss_docker_settings: "{{ docker_bridge_network_settings }}"
rss_miniflux_admin_user:
name: "{{ system_user_name }}"
password: "{{ system_user_password }}"
rss_rssbridge_bridges: ["Soundcloud", "Mixcloud", "Filter"]
tags:
- "rss"

- role: "artyorsh.selfhosted.homebox"
vars:
homebox_docker_settings: "{{ docker_bridge_network_settings }}"
tags:
- "homebox"

- role: "artyorsh.selfhosted.vaultwarden"
vars:
vaultwarden_docker_settings: "{{ docker_bridge_network_settings }}"
tags:
- "vaultwarden"

- role: "artyorsh.selfhosted.duplicati"
vars:
duplicati_source_dir: "{{ storage_smb_share_local_dir }}"
duplicati_backups_dir: "{{ storage_smb_share_local_dir }}/backups"
duplicati_docker_settings: "{{ docker_bridge_network_settings }}"
tags:
- "duplicati"

- role: "artyorsh.selfhosted.wallos"
vars:
wallos_docker_settings: "{{ docker_bridge_network_settings }}"
tags:
- "wallos"

Expand Down
2 changes: 1 addition & 1 deletion playbook-vps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
tags:
- "security"

- role: "docker"
- role: "artyorsh.selfhosted.docker"
tags:
- "docker"

Expand Down
2 changes: 0 additions & 2 deletions roles/docker/defaults/main.yml

This file was deleted.

21 changes: 0 additions & 21 deletions roles/docker/tasks/main.yml

This file was deleted.

7 changes: 0 additions & 7 deletions roles/monitoring/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,3 @@
- name: "Install and configure Glances"
ansible.builtin.include_role:
name: "artyorsh.selfhosted.glances"
vars:
glances_notifier: "/etc/glances-notify.sh"
glances_fs_volumes:
- "{{ storage_smb_share_local_dir }}"
glances_docker_settings: "{{ docker_host_network_settings }}"
tags:
- "glances"
25 changes: 0 additions & 25 deletions roles/security/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,28 +12,3 @@ security_firewall_allow_rules:
- desc: "Allow SSH"
proto: "tcp"
port: "{{ security_ssh_port }}"

# https://www.home-assistant.io/integrations/homekit/#firewall
- desc: "Allow mDNS (for HomeKit)"
proto: "udp"
port: "5353"

- desc: "Allow WireGuard"
proto: "udp"
port: "{{ wgeasy_udp_port }}"

- desc: "Allow Glances"
proto: "tcp"
port: "{{ glances_webui_port }}"

- desc: "Allow AdGuardHome (DNS)"
proto: "tcp"
port: "{{ adguardhome_dns_port }}"

- desc: "Allow AdGuardHome (DNS)"
proto: "udp"
port: "{{ adguardhome_dns_port }}"

- desc: "Allow AdGuardHome (Web UI)"
proto: "tcp"
port: "{{ adguardhome_webui_port }}"
4 changes: 0 additions & 4 deletions roles/storage/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,3 @@
- name: "Install Filebrowser"
ansible.builtin.include_role:
name: "artyorsh.selfhosted.filebrowser"
vars:
filebrowser_port: "{{ storage_filebrowser_port }}"
filebrowser_storage_root_dir: "{{ storage_smb_share_local_dir }}"
filebrowser_docker_settings: "{{ docker_bridge_network_settings }}"

0 comments on commit 1b35bc2

Please sign in to comment.