This repository has been archived by the owner on Dec 1, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 48 switch to docker swarm services (#51) * 48 Migrating to docker swarm * 48 Add docker stack files * 48 Edit monitoring stack * 48 Add traefik configs * 48 Testing traefik * 48 Testing traefik * 48 Testing traefik * 48 Test labels * 48 Fix packages * 48 Working Traefik reverse proxy * 48 Working Jellyfin, prometheus and testing grafana, portainer * 48 Add labels * 48 move legacy setup * 48 Fix portainer reverse proxy * 48 Tested all services --------- Co-authored-by: veerendra2 <[email protected]> * 18 cant connect to jellyfin server in android (#53) * 18 Change mount dirs * 18 Test self signed certs in traefik --------- Co-authored-by: veerendra2 <[email protected]> * 37 smoke tests tasks after install (#55) * 37 Update ansible tasks * 37 fix paths * 37 Refactoring * 37 Test deploy services * 37 Add smoke tests tasks --------- Co-authored-by: veerendra2 <[email protected]> * Update readme --------- Co-authored-by: veerendra2 <[email protected]>
- Loading branch information
1 parent
784392e
commit 6a41d16
Showing
193 changed files
with
33,451 additions
and
140 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
This file was deleted.
Oops, something went wrong.
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,4 @@ | ||
# Legacy Setup | ||
This is legacy/archived setup with `docker-compose` used previously, not using it anymore. Right now the setup migrated to docker swarm services. | ||
|
||
* Browse [wiki](./wiki) directory for documentation on legacy setup |
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,34 @@ | ||
--- | ||
|
||
- name: Create temporary bettercap build directory | ||
tempfile: | ||
state: directory | ||
suffix: build | ||
register: tempdir | ||
|
||
- name: Build bettercap | ||
shell: | | ||
go env -w GO111MODULE=off | ||
go get -u github.com/bettercap/bettercap | ||
environment: | ||
GOPATH: "{{ tempdir.path }}" | ||
|
||
- name: Install bettercap | ||
shell: | | ||
mv {{ tempdir.path }}/bin/bettercap /usr/local/bin/ | ||
rm -rf {{ tempdir.path }} | ||
bettercap -version | ||
become: yes | ||
register: output | ||
|
||
- name: Display bettercap version | ||
debug: | ||
msg: "{{ output.stdout }}" | ||
when: output.rc == 0 | ||
|
||
# https://www.bettercap.org/usage/webui/ | ||
- name: Install bettercap caplets | ||
shell: bettercap -eval "caplets.update; ui.update; q" | ||
when: output.rc == 0 | ||
ignore_errors: true | ||
become: true |
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,53 @@ | ||
# Author: Veerendra Kakumanu | ||
# Description: An Ansible playbook to make awesome Raspberry Pi homeserver(Legacy Setup) | ||
|
||
- name: Raspberry Pi Homeserver | ||
hosts: atom | ||
gather_facts: yes | ||
vars_files: | ||
- vars.yml | ||
|
||
pre_tasks: | ||
- name: Run update | ||
apt: | ||
upgrade: true | ||
update_cache: yes | ||
ignore_errors: yes | ||
become: yes | ||
|
||
post_tasks: | ||
- name: Run autoremove | ||
apt: | ||
autoremove: yes | ||
become: yes | ||
|
||
tasks: | ||
- name: Install bettercap | ||
import_tasks: bettercap.yml | ||
|
||
- name: Setup monitoring | ||
import_tasks: monitoring.yml | ||
|
||
- name: Setup pihole | ||
import_tasks: pihole.yml | ||
|
||
- name: Setup portainer | ||
import_tasks: portainer.yml | ||
|
||
- name: Setup homer | ||
import_tasks: homer.yml | ||
|
||
- name: Setup jellyfin | ||
import_tasks: jellyfin.yml | ||
|
||
- name: Setup nextcloud | ||
import_tasks: nextcloud.yml | ||
|
||
- name: Setup filebrowser | ||
import_tasks: filebrowser.yml | ||
|
||
- name: Setup nginx | ||
import_tasks: nginx.yml | ||
|
||
- name: Setup firewall rules | ||
import_tasks: ufw.yml |
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,58 @@ | ||
--- | ||
- set_fact: | ||
app: pihole | ||
project_dir: /opt/apps/pihole/ | ||
|
||
# https://github.com/pi-hole/docker-pi-hole#installing-on-ubuntu-or-fedora | ||
- name: Configure systemd-resolved for PiHole | ||
block: | ||
- name: Disable stub resolver in systemd-resolved config | ||
ini_file: | ||
path: /etc/systemd/resolved.conf | ||
section: Resolve | ||
option: DNSStubListener | ||
value: "no" | ||
backup: true | ||
|
||
- name: Create backup /etc/resolv.conf | ||
copy: | ||
remote_src: yes | ||
src: /etc/resolv.conf | ||
dest: /etc/resolv.conf.backup | ||
|
||
- name: Remove /etc/resolv.conf | ||
file: | ||
path: /etc/resolv.conf | ||
state: absent | ||
|
||
- name: Create link /etc/resolv.conf | ||
file: | ||
src: /run/systemd/resolve/resolv.conf | ||
dest: /etc/resolv.conf | ||
state: link | ||
|
||
- name: Restart systemd-resolved | ||
service: | ||
name: systemd-resolved | ||
state: restarted | ||
become: yes | ||
|
||
- name: Create project directory | {{ app }} | ||
file: | ||
path: "{{ project_dir }}" | ||
state: directory | ||
owner: "{{ run_user }}" | ||
become: yes | ||
|
||
- name: Synchronize project directory | {{ app }} | ||
synchronize: | ||
src: apps/pihole/ | ||
dest: "{{ project_dir }}" | ||
delete: false | ||
recursive: true | ||
perms: false | ||
|
||
- name: Run docker-compose up | {{ app }} | ||
docker_compose: | ||
project_src: "{{ project_dir }}" | ||
build: false |
File renamed without changes.
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,58 @@ | ||
--- | ||
- set_fact: | ||
external_iface_list: | ||
- eth0 | ||
- wlan0 | ||
allow_tcp_ports: | ||
- 80 | ||
- 443 | ||
- 22 | ||
- 53 | ||
- 7359 | ||
- 1900 | ||
allow_udp_ports: | ||
- 53 | ||
- 67 | ||
|
||
- block: | ||
# https://github.com/moby/moby/issues/4737#issuecomment-419705925 | ||
- name: Append custom rules in /etc/ufw/after.rules | ||
blockinfile: | ||
dest: /etc/ufw/after.rules | ||
block: "{{ lookup('template', 'templates/override_ufw_rules.j2' ) }}" | ||
marker: "#{mark} ANSIBLE MANAGED BLOCK" | ||
|
||
- name: Set DEFAULT_FORWARD_POLICY=DROP in /etc/default/ufw | ||
lineinfile: | ||
path: /etc/default/ufw | ||
regexp: '^DEFAULT_FORWARD_POLICY(.*)$' | ||
line: 'DEFAULT_FORWARD_POLICY="DROP"' | ||
backup: yes | ||
backrefs: yes | ||
|
||
- name: Set IPV6=no in /etc/default/ufw | ||
lineinfile: | ||
path: /etc/default/ufw | ||
regexp: '^IPV6=(.*)$' | ||
line: 'IPV6=no' | ||
backup: yes | ||
backrefs: yes | ||
|
||
- name: Allow selected tcp ports | ||
ufw: | ||
rule: allow | ||
port: "{{ item }}" | ||
proto: tcp | ||
with_items: "{{ allow_tcp_ports }}" | ||
|
||
- name: Allow selected udp ports | ||
ufw: | ||
rule: allow | ||
port: "{{ item }}" | ||
proto: udp | ||
with_items: "{{ allow_udp_ports }}" | ||
|
||
- name: Enable ufw | ||
ufw: | ||
state: enabled | ||
become: yes |
Oops, something went wrong.