diff --git a/ansible/inventory/inventory.yaml b/ansible/inventory/inventory.yaml index 88ddaf6..9f1449e 100644 --- a/ansible/inventory/inventory.yaml +++ b/ansible/inventory/inventory.yaml @@ -47,6 +47,9 @@ all: hosts: hv00.balsillie.house: kube00.balsillie.house: + nas: + hosts: + nas.balsillie.house: workstations: children: arch: diff --git a/ansible/playbooks/truenas.yml b/ansible/playbooks/truenas.yml new file mode 100644 index 0000000..d912eb8 --- /dev/null +++ b/ansible/playbooks/truenas.yml @@ -0,0 +1,17 @@ +--- + +- name: Configure Truenas + hosts: truenas + become: false + tasks: + - name: Install required packages + package: + name: "{{ item }}" + state: present + with_items: + - py37-ansible + - py37-pip + - py37-netifaces + - py37-netaddr + - py37-requests + - py37-yaml \ No newline at end of file diff --git a/compose/truenas-apps.yaml b/compose/truenas-apps.yaml new file mode 100644 index 0000000..97fb0fa --- /dev/null +++ b/compose/truenas-apps.yaml @@ -0,0 +1,72 @@ +# Docker compose file for truenas apps + +name: "apps" + +# Network + +networks: + apps: + attachable: true + driver: macvlan + driver_opts: + macvlan_mode: bridge + parent: eno1 + enable_ipv6: false + external: false + internal: false + ipam: + config: + - subnet: "10.96.10.0/24" + ip_range: "10.96.10.224/28" + gateway: "10.96.10.254" + name: apps + +services: + adguard: + container_name: adguard + image: adguard/adguardhome + restart: unless-stopped + networks: + apps: + ipv4_address: 10.96.10.53 + link_local_ips: [] + # ports: + # - "53:53/tcp" + # - "53:53/udp" + # - "80:80/tcp" + # - "443:443/tcp" + volumes: + - /mnt/hdd/apps/adguard/work:/opt/adguardhome/work + - /mnt/hdd/apps/adguard/conf:/opt/adguardhome/conf + - /mnt/hdd/apps/certbot/etc:/etc/letsencrypt + - /mnt/hdd/apps/certbot/var:/var/lib/letsencrypt + certbot: + container_name: certbot + image: certbot/dns-cloudflare + restart: "no" + networks: + apps: + ipv4_address: 10.96.10.11 + link_local_ips: [] + command: >- + certonly --dns-cloudflare + --dns-cloudflare-credentials /etc/letsencrypt/credentials.ini + --dns-cloudflare-propagation-seconds 20 + --email certbot-apps@balsillie.email + --non-interactive + --expand + --no-eff-email + --agree-tos + -d adguard.balsillie.house + -d unifi.balsillie.house + -d s3.balsillie.house + -d registry.balsillie.house + volumes: + - /mnt/hdd/apps/certbot/etc:/etc/letsencrypt + - /mnt/hdd/apps/certbot/var:/var/lib/letsencrypt + +# Certbot + +# Adguard + +# Minio \ No newline at end of file diff --git a/compose/truenas-rename.yaml b/compose/truenas-rename.yaml new file mode 100644 index 0000000..a2708a0 --- /dev/null +++ b/compose/truenas-rename.yaml @@ -0,0 +1,60 @@ +# Docker compose file for truenas apps + +name: "media" + +# Network + +networks: + apps: + external: true + name: apps + +services: + adguard: + container_name: adguard + image: adguard/adguardhome + restart: unless-stopped + networks: + apps: + ipv4_address: 10.96.10.53 + link_local_ips: [] + # ports: + # - "53:53/tcp" + # - "53:53/udp" + # - "80:80/tcp" + # - "443:443/tcp" + volumes: + - /mnt/hdd/apps/adguard/work:/opt/adguardhome/work + - /mnt/hdd/apps/adguard/conf:/opt/adguardhome/conf + - /mnt/hdd/apps/certbot/etc:/etc/letsencrypt + - /mnt/hdd/apps/certbot/var:/var/lib/letsencrypt + certbot: + container_name: certbot + image: certbot/dns-cloudflare + restart: "no" + networks: + apps: + ipv4_address: 10.96.10.11 + link_local_ips: [] + command: >- + certonly --dns-cloudflare + --dns-cloudflare-credentials /etc/letsencrypt/credentials.ini + --dns-cloudflare-propagation-seconds 20 + --email certbot-apps@balsillie.email + --non-interactive + --expand + --no-eff-email + --agree-tos + -d adguard.balsillie.house + -d unifi.balsillie.house + -d s3.balsillie.house + -d registry.balsillie.house + volumes: + - /mnt/hdd/apps/certbot/etc:/etc/letsencrypt + - /mnt/hdd/apps/certbot/var:/var/lib/letsencrypt + +# Certbot + +# Adguard + +# Minio \ No newline at end of file