Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
c9f5641698 |
1
ansible/group_vars/all/k3s
Normal file
1
ansible/group_vars/all/k3s
Normal file
@ -0,0 +1 @@
|
||||
k3s_cluster_group: homelab
|
@ -36,11 +36,3 @@ postgresql_hba_entries:
|
||||
- {type: host, database: all, user: all, address: '::1/128', auth_method: md5}
|
||||
- {type: host, database: all, user: all, address: '::0/128', auth_method: md5}
|
||||
- {type: host, database: all, user: all, address: '0.0.0.0/0', auth_method: md5}
|
||||
|
||||
postgresql_global_config_options:
|
||||
- option: unix_socket_directories
|
||||
value: '{{ postgresql_unix_socket_directories | join(",") }}'
|
||||
- option: listen_addresses
|
||||
value: '*'
|
||||
- option: wal_keep_size
|
||||
value: 200
|
||||
|
@ -44,7 +44,8 @@ dhcpd_hosts:
|
||||
ethernet: '68:1D:EF:3C:F0:44'
|
||||
- hostname: 'bleys'
|
||||
address: '192.168.1.42'
|
||||
ethernet: '14:B3:1F:14:C0:D2'
|
||||
ethernet: '68:1d:ef:2b:3d:24'
|
||||
|
||||
|
||||
- hostname: 'xiaomi-chambre-gateway'
|
||||
address: '192.168.1.61'
|
||||
|
@ -1,2 +1,3 @@
|
||||
nomad_datacenter: homelab
|
||||
k3s_consul_service: true
|
||||
system_wol_enable: True
|
||||
|
@ -1,7 +1,7 @@
|
||||
---
|
||||
ansible_host: "192.168.1.42"
|
||||
ansible_python_interpreter: "/usr/bin/python3"
|
||||
default_interface: "enp0s31f6"
|
||||
default_interface: "enp2s0"
|
||||
consul_iface: "{{ default_interface}}"
|
||||
vault_iface: "{{ default_interface}}"
|
||||
nfs_iface: "{{ default_interface}}"
|
||||
|
@ -47,3 +47,4 @@ nomad_host_networks:
|
||||
- name: "default"
|
||||
interface: wg0
|
||||
vault_listener_address: 10.0.0.4
|
||||
nomad_plugins_podman: True
|
||||
|
@ -1,10 +1,4 @@
|
||||
---
|
||||
- name: Consul install
|
||||
hosts: all
|
||||
roles:
|
||||
- role: ansible-consul
|
||||
become: true
|
||||
|
||||
- name: Vault install
|
||||
hosts: homelab
|
||||
roles:
|
||||
@ -46,8 +40,6 @@
|
||||
|
||||
- name: nomad
|
||||
hosts: all
|
||||
vars:
|
||||
unseal_keys_dir_output: ~/vaultunseal
|
||||
roles:
|
||||
- role: ansible-nomad
|
||||
become: true
|
||||
|
8
ansible/playbooks/consul.yml
Normal file
8
ansible/playbooks/consul.yml
Normal file
@ -0,0 +1,8 @@
|
||||
---
|
||||
- name: Consul install
|
||||
hosts: all
|
||||
roles:
|
||||
- role: ansible-consul
|
||||
become: true
|
||||
|
||||
|
5
ansible/playbooks/kube.yml
Normal file
5
ansible/playbooks/kube.yml
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
- name: k3s
|
||||
hosts: all
|
||||
roles:
|
||||
- role: ansible-k3s
|
@ -45,5 +45,7 @@ roles:
|
||||
- src: git@git.ducamps.eu:2222/ansible-roles/ansible-role-pureftpd.git
|
||||
scm: git
|
||||
- src: https://github.com/PowerDNS/pdns_recursor-ansible.git
|
||||
- src: ssh://git@git.ducamps.eu:2222/ansible-roles/ansible-k3s.git
|
||||
scm: git
|
||||
collections:
|
||||
- name: vladgh.samba
|
||||
|
@ -2,7 +2,9 @@
|
||||
- import_playbook: playbooks/server.yml
|
||||
- import_playbook: playbooks/dhcpd.yml
|
||||
- import_playbook: playbooks/dns.yml
|
||||
- import_playbook: playbooks/HashicorpStack.yml
|
||||
- import_playbook: playbooks/consul.yml
|
||||
- import_playbook: playbooks/kube.yml
|
||||
#- import_playbook: playbooks/HashicorpStack.yml
|
||||
- import_playbook: playbooks/nas.yml
|
||||
- import_playbook: playbooks/autofs.yml
|
||||
- import_playbook: playbooks/sssd.yml
|
||||
|
@ -85,8 +85,7 @@ exclude_patterns:
|
||||
- '*nomad/registry'
|
||||
- '*nomad/pacoloco'
|
||||
- '*nomad/pihole'
|
||||
- '*nomad/jellyfin/*'
|
||||
- '*.log*'
|
||||
- '*nomad/jellyfin/config/data/library*'
|
||||
|
||||
match_archives: '*'
|
||||
archive_name_format: '{{ env "node.datacenter" }}-{now:%Y-%m-%dT%H:%M:%S.%f}'
|
||||
|
@ -14,7 +14,7 @@ job "immich" {
|
||||
network {
|
||||
mode = "host"
|
||||
port "http" {
|
||||
to = 2283
|
||||
to = 3001
|
||||
}
|
||||
port "redis" {
|
||||
to = 6379
|
||||
@ -91,7 +91,6 @@ job "immich" {
|
||||
REDIS_HOSTNAME = {{env "NOMAD_IP_redis"}}
|
||||
REDIS_PORT = {{env "NOMAD_HOST_PORT_redis"}}
|
||||
IMMICH_MACHINE_LEARNING_URL = http://{{ env "NOMAD_ADDR_machinelearning"}}
|
||||
IMMICH_HOST=0.0.0.0
|
||||
EOH
|
||||
destination = "secrets/immich.env"
|
||||
env = true
|
||||
|
@ -45,8 +45,7 @@ job "torrent" {
|
||||
}
|
||||
config {
|
||||
ulimit {
|
||||
nproc=65535
|
||||
nofile = "32000:40000"
|
||||
nofile = "8192:8192"
|
||||
}
|
||||
image = "docker.service.consul:5000/crazymax/rtorrent-rutorrent:edge"
|
||||
ports = [
|
||||
|
@ -35,8 +35,8 @@ job "sample" {
|
||||
port = "http"
|
||||
tags = [
|
||||
"traefik.enable=true",
|
||||
"traefik.http.routers.${NOMAD_JOB_NAME}.rule=Host(`${NOMAD_JOB_NAME}.ducamps.eu`)",
|
||||
"traefik.http.routers.${NOMAD_JOB_NAME}.tls.domains[0].sans=${NOMAD_JOB_NAME}.ducamps.eu",
|
||||
"traefik.http.routers.${NOMAD_JOB_NAME}.rule=Host(`${NOMAD_JOB_NAME}.ducamps.win`)",
|
||||
"traefik.http.routers.${NOMAD_JOB_NAME}.tls.domains[0].sans=${NOMAD_JOB_NAME}.ducamps.win",
|
||||
"traefik.http.routers.${NOMAD_JOB_NAME}.tls.certresolver=myresolver",
|
||||
"traefik.http.routers.${NOMAD_JOB_NAME}.entrypoints=web,websecure",
|
||||
|
||||
|
@ -98,23 +98,11 @@ include-dir=/etc/powerdns/pdns.d
|
||||
template{
|
||||
destination = "local/recursor.conf"
|
||||
data= <<EOH
|
||||
dnssec:
|
||||
validation: off
|
||||
recursor:
|
||||
forward_zones:
|
||||
- zone: consul
|
||||
forwarders:
|
||||
- 127.0.0.1:8600
|
||||
- zone : ducamps.eu
|
||||
forwarders:
|
||||
- 192.168.1.5
|
||||
- zone: 1.168.192.in-addr.arpa
|
||||
forwarders:
|
||||
- 192.168.1.5
|
||||
incoming:
|
||||
listen:
|
||||
- 192.168.1.6
|
||||
EOH
|
||||
config-dir=/etc/powerdns
|
||||
dnssec=off
|
||||
forward-zones=consul=127.0.0.1:8600,ducamps.eu=192.168.1.5,1.168.192.in-addr.arpa=192.168.1.5
|
||||
local-address=192.168.1.6
|
||||
EOH
|
||||
}
|
||||
resources {
|
||||
cpu = 50
|
||||
|
Loading…
Reference in New Issue
Block a user