Adding netbird to all relivant vms
This commit is contained in:
@@ -8,13 +8,16 @@
|
||||
|
||||
tasks:
|
||||
- name: set-debcache.yml - Setup apt proxy debcache
|
||||
include: ../../lib/set-debcache.yml
|
||||
import_tasks: ../../lib/set-debcache.yml
|
||||
|
||||
- name: Upgrade-packages.yml - update packages
|
||||
include: ../../lib/upgrade-packages.yml
|
||||
import_tasks: ../../lib/upgrade-packages.yml
|
||||
|
||||
- name: Install-docker.yml - setting up docker
|
||||
include: ../../lib/install-docker.yml
|
||||
import_tasks: ../../lib/install-docker.yml
|
||||
|
||||
- name: Setup-netbird.yml - setting up netbird mesh vpn
|
||||
import_tasks: ../../lib/setup-netbird.yml
|
||||
|
||||
- name: Create grail user
|
||||
user:
|
||||
|
||||
@@ -7,6 +7,9 @@
|
||||
vars:
|
||||
|
||||
tasks:
|
||||
- name: Setup-netbird.yml - setting up netbird mesh vpn
|
||||
import_tasks: ../../lib/setup-netbird.yml
|
||||
|
||||
|
||||
- name: Set apt-cacher-ng cache directory permissions
|
||||
file:
|
||||
|
||||
@@ -11,13 +11,16 @@
|
||||
# ansible.builtin.command: /usr/bin/ansible-playbook ./roles/ind/grail/set-pvenode.yml -k
|
||||
# delegate_to: 127.0.0.1
|
||||
- name: set-debcache.yml - Setup apt proxy debcache
|
||||
include: ../../lib/set-debcache.yml
|
||||
import_tasks: ../../lib/set-debcache.yml
|
||||
|
||||
- name: Upgrade-packages.yml - update packages
|
||||
include: ../../lib/upgrade-packages.yml
|
||||
import_tasks: ../../lib/upgrade-packages.yml
|
||||
|
||||
- name: Install-docker.yml - setting up docker
|
||||
include: ../../lib/install-docker.yml
|
||||
import_tasks: ../../lib/install-docker.yml
|
||||
|
||||
- name: Setup-netbird.yml - setting up netbird mesh vpn
|
||||
import_tasks: ../../lib/setup-netbird.yml
|
||||
|
||||
- name: Create grail user
|
||||
user:
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
ALLOWED_HOSTS=healthcheck.local
|
||||
DEFAULT_FROM_EMAIL=healthcheck@homelab.com
|
||||
EMAIL_HOST=stmp@healthcheck.local
|
||||
EMAIL_HOST_PASSWORD=password
|
||||
EMAIL_HOST_USER=user
|
||||
SECRET_KEY=jnweqcrun2409vn8q9p34nf2iunskjdncv
|
||||
SITE_ROOT=http://192.168.0.60
|
||||
@@ -1,94 +0,0 @@
|
||||
---
|
||||
- hosts: all
|
||||
become: yes
|
||||
remote_user: ansible
|
||||
gather_facts: false
|
||||
|
||||
vars:
|
||||
docker_compose_definition: |
|
||||
volumes:
|
||||
db-data:
|
||||
|
||||
services:
|
||||
db:
|
||||
image: postgres:16
|
||||
volumes:
|
||||
- db-data:/var/lib/postgresql/data
|
||||
environment:
|
||||
- POSTGRES_DB=$DB_NAME
|
||||
- POSTGRES_PASSWORD=$DB_PASSWORD
|
||||
web:
|
||||
image: healthchecks/healthchecks:latest
|
||||
env_file:
|
||||
- docker-compose.env
|
||||
ports:
|
||||
- "8000:8000"
|
||||
# To enable SMTP on port 2525, set SMTPD_PORT=2525 in .env
|
||||
# and uncomment the following line:
|
||||
# - "2525:2525"
|
||||
depends_on:
|
||||
- db
|
||||
command: bash -c 'while !</dev/tcp/db/5432; do sleep 1; done; uwsgi /opt/healthchecks/docker/uwsgi.ini'
|
||||
|
||||
|
||||
tasks:
|
||||
- name: set-debcache.yml - Setup apt proxy debcache
|
||||
include: ../../lib/set-debcache.yml
|
||||
|
||||
- name: Upgrade-packages.yml - update packages
|
||||
include: ../../lib/upgrade-packages.yml
|
||||
|
||||
- name: Install-docker.yml - setting up docker
|
||||
include: ../../lib/install-docker.yml
|
||||
|
||||
- name: Setup Service
|
||||
copy:
|
||||
dest: /etc/systemd/system/healthcheck.service
|
||||
content: |
|
||||
[Unit]
|
||||
Description=healthcheck
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
User=healthcheck
|
||||
WorkingDirectory=/home/docker/
|
||||
ExecStart=docker compose up -d
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0644'
|
||||
|
||||
# docker image is broken using manual install method
|
||||
- name: Write docker-compose.yml
|
||||
ansible.builtin.copy:
|
||||
content: "{{ docker_compose_definition }}"
|
||||
dest: /home/docker/docker-compose.yml
|
||||
owner: docker
|
||||
group: docker
|
||||
mode: u=rw,g=r,o=r
|
||||
|
||||
- name: Check if healthcheck's data directory exists
|
||||
stat:
|
||||
path: /data/data
|
||||
register: healthcheck_stat
|
||||
|
||||
- name: Restore healthcheck Dir
|
||||
shell: |
|
||||
restic --password-file /home/restic/.resticpassword -r sftp:misamisa://home/restic/$(hostname) --target / restore latest
|
||||
args:
|
||||
chdir: /home/restic
|
||||
creates: /data/healthcheck
|
||||
when: not healthcheck_stat.stat.exists or not healthcheck_stat.stat.isdir
|
||||
|
||||
- name: Reload systemd daemon
|
||||
systemd:
|
||||
daemon_reload: yes
|
||||
|
||||
- name: Start healthcheck Service
|
||||
systemd:
|
||||
name: healthcheck
|
||||
state: started
|
||||
enabled: yes
|
||||
@@ -8,13 +8,16 @@
|
||||
|
||||
tasks:
|
||||
- name: set-debcache.yml - Setup apt proxy debcache
|
||||
include: ../../lib/set-debcache.yml
|
||||
import_tasks: ../../lib/set-debcache.yml
|
||||
|
||||
- name: Upgrade-packages.yml - update packages
|
||||
include: ../../lib/upgrade-packages.yml
|
||||
import_tasks: ../../lib/upgrade-packages.yml
|
||||
|
||||
- name: Install-docker.yml - setting up docker
|
||||
include: ../../lib/install-docker.yml
|
||||
import_tasks: ../../lib/install-docker.yml
|
||||
|
||||
- name: Setup-netbird.yml - setting up netbird mesh vpn
|
||||
import_tasks: ../../lib/setup-netbird.yml
|
||||
|
||||
- name: Create grail user
|
||||
user:
|
||||
|
||||
@@ -19,6 +19,9 @@
|
||||
ansible.builtin.include_tasks:
|
||||
file: ../../lib/install-docker.yml
|
||||
|
||||
- name: Setup-netbird.yml - setting up netbird mesh vpn
|
||||
import_tasks: ../../lib/setup-netbird.yml
|
||||
|
||||
- name: Install Python Packages
|
||||
apt:
|
||||
name:
|
||||
|
||||
@@ -45,13 +45,16 @@
|
||||
|
||||
tasks:
|
||||
- name: set-debcache.yml - Setup apt proxy debcache
|
||||
include: ../../lib/set-debcache.yml
|
||||
import_tasks: ../../lib/set-debcache.yml
|
||||
|
||||
- name: Upgrade-packages.yml - update packages
|
||||
include: ../../lib/upgrade-packages.yml
|
||||
import_tasks: ../../lib/upgrade-packages.yml
|
||||
|
||||
- name: Install-docker.yml - setting up docker
|
||||
include: ../../lib/install-docker.yml
|
||||
import_tasks: ../../lib/install-docker.yml
|
||||
|
||||
- name: Setup-netbird.yml - setting up netbird mesh vpn
|
||||
import_tasks: ../../lib/setup-netbird.yml
|
||||
|
||||
- name: Create wikmd user
|
||||
user:
|
||||
|
||||
Reference in New Issue
Block a user