From bc1ad567d2eac46088285ed7d2d688fffc91a82f Mon Sep 17 00:00:00 2001 From: Kumar Damani Date: Tue, 30 Jun 2026 23:54:20 -0400 Subject: updates to ans. and tf --- .gitignore | 0 LICENSE | 0 README.md | 0 ansible/.envrc | 0 ansible/README.md | 9 +- ansible/ansible-lint.yaml | 0 ansible/ansible.cfg | 0 ansible/archi.png | Bin ansible/group_vars/all/vault | 0 ansible/group_vars/all/vault.example | 0 ansible/hosts | 0 ansible/playbooks/init.yaml | 0 ansible/poetry.lock | 0 ansible/pyproject.toml | 0 ansible/roles/base/tasks/main.yaml | 0 ansible/roles/caddy_add/meta/argument_specs.yaml | 0 ansible/roles/caddy_add/meta/main.yaml | 0 ansible/roles/caddy_add/tasks/main.yaml | 0 ansible/roles/docker/tasks/main.yaml | 0 ansible/roles/med_dl/defaults/main.yaml | 0 ansible/roles/med_dl/meta/argument_specs.yaml | 0 ansible/roles/med_dl/meta/main.yaml | 0 ansible/roles/med_dl/tasks/config.yaml | 0 ansible/roles/med_dl/tasks/main.yaml | 0 ansible/roles/med_dl/tasks/setup.yaml | 0 .../roles/med_dl/templates/docker-compose.yaml.j2 | 0 ansible/roles/monitoring/meta/argument_specs.yaml | 0 ansible/roles/monitoring/meta/main.yaml | 0 ansible/roles/monitoring/tasks/config.yaml | 0 ansible/roles/monitoring/tasks/main.yaml | 0 ansible/roles/monitoring/tasks/setup.yaml | 0 .../roles/monitoring/templates/prometheus.yml.j2 | 0 ansible/roles/nextcloud/defaults/main.yaml | 0 ansible/roles/nextcloud/meta/argument_specs.yaml | 0 ansible/roles/nextcloud/meta/main.yaml | 0 ansible/roles/nextcloud/tasks/config.yaml | 0 ansible/roles/nextcloud/tasks/main.yaml | 0 ansible/roles/nextcloud/tasks/setup.yaml | 0 .../nextcloud/templates/docker-compose.yaml.j2 | 0 ansible/roles/plex/defaults/main.yaml | 0 ansible/roles/plex/meta/argument_specs.yaml | 0 ansible/roles/plex/meta/main.yaml | 0 ansible/roles/plex/tasks/main.yaml | 0 ansible/roles/plex/tasks/setup.yaml | 0 ansible/roles/torrents/defaults/main.yaml | 0 ansible/roles/torrents/meta/argument_specs.yaml | 0 ansible/roles/torrents/meta/main.yaml | 0 ansible/roles/torrents/tasks/config.yaml | 0 ansible/roles/torrents/tasks/main.yaml | 0 ansible/roles/torrents/tasks/setup.yaml | 0 ansible/roles/torrents/templates/settings.json.j2 | 0 ansible/roles/vault/meta/argument_specs.yaml | 0 ansible/roles/vault/meta/main.yaml | 0 ansible/roles/vault/tasks/main.yaml | 0 ansible/roles/vault/tasks/setup.yaml | 0 .../roles/vault/templates/docker-compose.yaml.j2 | 0 flake.lock | 0 flake.nix | 0 terraform/.envrc | 0 terraform/README.md | 0 terraform/con.env.example | 0 terraform/main.tf | 123 +++++++++++++++------ terraform/terraform.tf | 5 +- terraform/variables.tf | 0 64 files changed, 95 insertions(+), 42 deletions(-) mode change 100644 => 100755 .gitignore mode change 100644 => 100755 LICENSE mode change 100644 => 100755 README.md mode change 100644 => 100755 ansible/.envrc mode change 100644 => 100755 ansible/README.md mode change 100644 => 100755 ansible/ansible-lint.yaml mode change 100644 => 100755 ansible/ansible.cfg mode change 100644 => 100755 ansible/archi.png mode change 100644 => 100755 ansible/group_vars/all/vault mode change 100644 => 100755 ansible/group_vars/all/vault.example mode change 100644 => 100755 ansible/hosts mode change 100644 => 100755 ansible/playbooks/init.yaml mode change 100644 => 100755 ansible/poetry.lock mode change 100644 => 100755 ansible/pyproject.toml mode change 100644 => 100755 ansible/roles/base/tasks/main.yaml mode change 100644 => 100755 ansible/roles/caddy_add/meta/argument_specs.yaml mode change 100644 => 100755 ansible/roles/caddy_add/meta/main.yaml mode change 100644 => 100755 ansible/roles/caddy_add/tasks/main.yaml mode change 100644 => 100755 ansible/roles/docker/tasks/main.yaml mode change 100644 => 100755 ansible/roles/med_dl/defaults/main.yaml mode change 100644 => 100755 ansible/roles/med_dl/meta/argument_specs.yaml mode change 100644 => 100755 ansible/roles/med_dl/meta/main.yaml mode change 100644 => 100755 ansible/roles/med_dl/tasks/config.yaml mode change 100644 => 100755 ansible/roles/med_dl/tasks/main.yaml mode change 100644 => 100755 ansible/roles/med_dl/tasks/setup.yaml mode change 100644 => 100755 ansible/roles/med_dl/templates/docker-compose.yaml.j2 mode change 100644 => 100755 ansible/roles/monitoring/meta/argument_specs.yaml mode change 100644 => 100755 ansible/roles/monitoring/meta/main.yaml mode change 100644 => 100755 ansible/roles/monitoring/tasks/config.yaml mode change 100644 => 100755 ansible/roles/monitoring/tasks/main.yaml mode change 100644 => 100755 ansible/roles/monitoring/tasks/setup.yaml mode change 100644 => 100755 ansible/roles/monitoring/templates/prometheus.yml.j2 mode change 100644 => 100755 ansible/roles/nextcloud/defaults/main.yaml mode change 100644 => 100755 ansible/roles/nextcloud/meta/argument_specs.yaml mode change 100644 => 100755 ansible/roles/nextcloud/meta/main.yaml mode change 100644 => 100755 ansible/roles/nextcloud/tasks/config.yaml mode change 100644 => 100755 ansible/roles/nextcloud/tasks/main.yaml mode change 100644 => 100755 ansible/roles/nextcloud/tasks/setup.yaml mode change 100644 => 100755 ansible/roles/nextcloud/templates/docker-compose.yaml.j2 mode change 100644 => 100755 ansible/roles/plex/defaults/main.yaml mode change 100644 => 100755 ansible/roles/plex/meta/argument_specs.yaml mode change 100644 => 100755 ansible/roles/plex/meta/main.yaml mode change 100644 => 100755 ansible/roles/plex/tasks/main.yaml mode change 100644 => 100755 ansible/roles/plex/tasks/setup.yaml mode change 100644 => 100755 ansible/roles/torrents/defaults/main.yaml mode change 100644 => 100755 ansible/roles/torrents/meta/argument_specs.yaml mode change 100644 => 100755 ansible/roles/torrents/meta/main.yaml mode change 100644 => 100755 ansible/roles/torrents/tasks/config.yaml mode change 100644 => 100755 ansible/roles/torrents/tasks/main.yaml mode change 100644 => 100755 ansible/roles/torrents/tasks/setup.yaml mode change 100644 => 100755 ansible/roles/torrents/templates/settings.json.j2 mode change 100644 => 100755 ansible/roles/vault/meta/argument_specs.yaml mode change 100644 => 100755 ansible/roles/vault/meta/main.yaml mode change 100644 => 100755 ansible/roles/vault/tasks/main.yaml mode change 100644 => 100755 ansible/roles/vault/tasks/setup.yaml mode change 100644 => 100755 ansible/roles/vault/templates/docker-compose.yaml.j2 mode change 100644 => 100755 flake.lock mode change 100644 => 100755 flake.nix mode change 100644 => 100755 terraform/.envrc mode change 100644 => 100755 terraform/README.md mode change 100644 => 100755 terraform/con.env.example mode change 100644 => 100755 terraform/main.tf mode change 100644 => 100755 terraform/terraform.tf mode change 100644 => 100755 terraform/variables.tf diff --git a/.gitignore b/.gitignore old mode 100644 new mode 100755 diff --git a/LICENSE b/LICENSE old mode 100644 new mode 100755 diff --git a/README.md b/README.md old mode 100644 new mode 100755 diff --git a/ansible/.envrc b/ansible/.envrc old mode 100644 new mode 100755 diff --git a/ansible/README.md b/ansible/README.md old mode 100644 new mode 100755 index 4c67f24..5b971b3 --- a/ansible/README.md +++ b/ansible/README.md @@ -8,13 +8,14 @@ to our reverse proxy (Caddy) configuration. ![architecture image](archi.png) # TODOs (in-progress) -1. reverse-proxy init +1. reverse-proxy (Caddy) init 1. minio user,bucket init 1. static sites using minio bucket # Done 1. Adding service to reverse-proxy (Caddy) via api -1. Media Downloader with Transmission, and `*arr` services +1. Media Downloader for `*arr` services +1. Torrent server 1. Plex 1. Password Manager 1. Nextcloud @@ -39,11 +40,11 @@ git checkout group_vars/all/vault.example ```bash ansible-vault view/edit group_vars/all/vault ``` -1. (FTO) Run the `init.yaml` playbook with a `limit` to install a service +1. (FTO) Run the `init.yaml` playbook with a `limit` and `tag` to install a service ```bash ansible-playbook playbooks/init.yaml --limit=[app name] --tags=install ``` -1. Use another playbook to modify a service +1. Run the playbook with a `limit` and `tag` to modify a service ```bash ansible-playbook playbooks/... --limit=[app name] --tags=config ``` diff --git a/ansible/ansible-lint.yaml b/ansible/ansible-lint.yaml old mode 100644 new mode 100755 diff --git a/ansible/ansible.cfg b/ansible/ansible.cfg old mode 100644 new mode 100755 diff --git a/ansible/archi.png b/ansible/archi.png old mode 100644 new mode 100755 diff --git a/ansible/group_vars/all/vault b/ansible/group_vars/all/vault old mode 100644 new mode 100755 diff --git a/ansible/group_vars/all/vault.example b/ansible/group_vars/all/vault.example old mode 100644 new mode 100755 diff --git a/ansible/hosts b/ansible/hosts old mode 100644 new mode 100755 diff --git a/ansible/playbooks/init.yaml b/ansible/playbooks/init.yaml old mode 100644 new mode 100755 diff --git a/ansible/poetry.lock b/ansible/poetry.lock old mode 100644 new mode 100755 diff --git a/ansible/pyproject.toml b/ansible/pyproject.toml old mode 100644 new mode 100755 diff --git a/ansible/roles/base/tasks/main.yaml b/ansible/roles/base/tasks/main.yaml old mode 100644 new mode 100755 diff --git a/ansible/roles/caddy_add/meta/argument_specs.yaml b/ansible/roles/caddy_add/meta/argument_specs.yaml old mode 100644 new mode 100755 diff --git a/ansible/roles/caddy_add/meta/main.yaml b/ansible/roles/caddy_add/meta/main.yaml old mode 100644 new mode 100755 diff --git a/ansible/roles/caddy_add/tasks/main.yaml b/ansible/roles/caddy_add/tasks/main.yaml old mode 100644 new mode 100755 diff --git a/ansible/roles/docker/tasks/main.yaml b/ansible/roles/docker/tasks/main.yaml old mode 100644 new mode 100755 diff --git a/ansible/roles/med_dl/defaults/main.yaml b/ansible/roles/med_dl/defaults/main.yaml old mode 100644 new mode 100755 diff --git a/ansible/roles/med_dl/meta/argument_specs.yaml b/ansible/roles/med_dl/meta/argument_specs.yaml old mode 100644 new mode 100755 diff --git a/ansible/roles/med_dl/meta/main.yaml b/ansible/roles/med_dl/meta/main.yaml old mode 100644 new mode 100755 diff --git a/ansible/roles/med_dl/tasks/config.yaml b/ansible/roles/med_dl/tasks/config.yaml old mode 100644 new mode 100755 diff --git a/ansible/roles/med_dl/tasks/main.yaml b/ansible/roles/med_dl/tasks/main.yaml old mode 100644 new mode 100755 diff --git a/ansible/roles/med_dl/tasks/setup.yaml b/ansible/roles/med_dl/tasks/setup.yaml old mode 100644 new mode 100755 diff --git a/ansible/roles/med_dl/templates/docker-compose.yaml.j2 b/ansible/roles/med_dl/templates/docker-compose.yaml.j2 old mode 100644 new mode 100755 diff --git a/ansible/roles/monitoring/meta/argument_specs.yaml b/ansible/roles/monitoring/meta/argument_specs.yaml old mode 100644 new mode 100755 diff --git a/ansible/roles/monitoring/meta/main.yaml b/ansible/roles/monitoring/meta/main.yaml old mode 100644 new mode 100755 diff --git a/ansible/roles/monitoring/tasks/config.yaml b/ansible/roles/monitoring/tasks/config.yaml old mode 100644 new mode 100755 diff --git a/ansible/roles/monitoring/tasks/main.yaml b/ansible/roles/monitoring/tasks/main.yaml old mode 100644 new mode 100755 diff --git a/ansible/roles/monitoring/tasks/setup.yaml b/ansible/roles/monitoring/tasks/setup.yaml old mode 100644 new mode 100755 diff --git a/ansible/roles/monitoring/templates/prometheus.yml.j2 b/ansible/roles/monitoring/templates/prometheus.yml.j2 old mode 100644 new mode 100755 diff --git a/ansible/roles/nextcloud/defaults/main.yaml b/ansible/roles/nextcloud/defaults/main.yaml old mode 100644 new mode 100755 diff --git a/ansible/roles/nextcloud/meta/argument_specs.yaml b/ansible/roles/nextcloud/meta/argument_specs.yaml old mode 100644 new mode 100755 diff --git a/ansible/roles/nextcloud/meta/main.yaml b/ansible/roles/nextcloud/meta/main.yaml old mode 100644 new mode 100755 diff --git a/ansible/roles/nextcloud/tasks/config.yaml b/ansible/roles/nextcloud/tasks/config.yaml old mode 100644 new mode 100755 diff --git a/ansible/roles/nextcloud/tasks/main.yaml b/ansible/roles/nextcloud/tasks/main.yaml old mode 100644 new mode 100755 diff --git a/ansible/roles/nextcloud/tasks/setup.yaml b/ansible/roles/nextcloud/tasks/setup.yaml old mode 100644 new mode 100755 diff --git a/ansible/roles/nextcloud/templates/docker-compose.yaml.j2 b/ansible/roles/nextcloud/templates/docker-compose.yaml.j2 old mode 100644 new mode 100755 diff --git a/ansible/roles/plex/defaults/main.yaml b/ansible/roles/plex/defaults/main.yaml old mode 100644 new mode 100755 diff --git a/ansible/roles/plex/meta/argument_specs.yaml b/ansible/roles/plex/meta/argument_specs.yaml old mode 100644 new mode 100755 diff --git a/ansible/roles/plex/meta/main.yaml b/ansible/roles/plex/meta/main.yaml old mode 100644 new mode 100755 diff --git a/ansible/roles/plex/tasks/main.yaml b/ansible/roles/plex/tasks/main.yaml old mode 100644 new mode 100755 diff --git a/ansible/roles/plex/tasks/setup.yaml b/ansible/roles/plex/tasks/setup.yaml old mode 100644 new mode 100755 diff --git a/ansible/roles/torrents/defaults/main.yaml b/ansible/roles/torrents/defaults/main.yaml old mode 100644 new mode 100755 diff --git a/ansible/roles/torrents/meta/argument_specs.yaml b/ansible/roles/torrents/meta/argument_specs.yaml old mode 100644 new mode 100755 diff --git a/ansible/roles/torrents/meta/main.yaml b/ansible/roles/torrents/meta/main.yaml old mode 100644 new mode 100755 diff --git a/ansible/roles/torrents/tasks/config.yaml b/ansible/roles/torrents/tasks/config.yaml old mode 100644 new mode 100755 diff --git a/ansible/roles/torrents/tasks/main.yaml b/ansible/roles/torrents/tasks/main.yaml old mode 100644 new mode 100755 diff --git a/ansible/roles/torrents/tasks/setup.yaml b/ansible/roles/torrents/tasks/setup.yaml old mode 100644 new mode 100755 diff --git a/ansible/roles/torrents/templates/settings.json.j2 b/ansible/roles/torrents/templates/settings.json.j2 old mode 100644 new mode 100755 diff --git a/ansible/roles/vault/meta/argument_specs.yaml b/ansible/roles/vault/meta/argument_specs.yaml old mode 100644 new mode 100755 diff --git a/ansible/roles/vault/meta/main.yaml b/ansible/roles/vault/meta/main.yaml old mode 100644 new mode 100755 diff --git a/ansible/roles/vault/tasks/main.yaml b/ansible/roles/vault/tasks/main.yaml old mode 100644 new mode 100755 diff --git a/ansible/roles/vault/tasks/setup.yaml b/ansible/roles/vault/tasks/setup.yaml old mode 100644 new mode 100755 diff --git a/ansible/roles/vault/templates/docker-compose.yaml.j2 b/ansible/roles/vault/templates/docker-compose.yaml.j2 old mode 100644 new mode 100755 diff --git a/flake.lock b/flake.lock old mode 100644 new mode 100755 diff --git a/flake.nix b/flake.nix old mode 100644 new mode 100755 diff --git a/terraform/.envrc b/terraform/.envrc old mode 100644 new mode 100755 diff --git a/terraform/README.md b/terraform/README.md old mode 100644 new mode 100755 diff --git a/terraform/con.env.example b/terraform/con.env.example old mode 100644 new mode 100755 diff --git a/terraform/main.tf b/terraform/main.tf old mode 100644 new mode 100755 index 599d61d..76d5b7a --- a/terraform/main.tf +++ b/terraform/main.tf @@ -9,6 +9,7 @@ resource "proxmox_lxc" "minio" { memory = 2048 start = true onboot = true + startup = "order=2,up=30" ssh_public_keys = <<-EOT ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM9ONfhaHpY0bSk3o81H/eEp+UxQ9RCszJ7p3f+rvcpH kdam0@art-sr @@ -43,6 +44,7 @@ resource "proxmox_lxc" "sites" { memory = 1024 start = true onboot = true + startup = "order=3" ssh_public_keys = <<-EOT ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM9ONfhaHpY0bSk3o81H/eEp+UxQ9RCszJ7p3f+rvcpH kdam0@art-sr @@ -66,36 +68,6 @@ resource "proxmox_lxc" "sites" { } } -resource "proxmox_lxc" "rproxy" { - target_node = "hesh" - hostname = "rproxy" - ostemplate = "local:vztmpl/alpine-3.18-default_20230607_amd64.tar.xz" - password = "${var.rproxy_password}" - unprivileged = true - cores = 1 - cpulimit = 1 - memory = 1024 - start = true - onboot = true - - ssh_public_keys = <<-EOT - ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM9ONfhaHpY0bSk3o81H/eEp+UxQ9RCszJ7p3f+rvcpH kdam0@art-sr - EOT - - rootfs { - storage = "local-lvm" - size = "2G" - } - - network { - name = "eth0" - bridge = "vmbr1" - tag = 30 - ip = "dhcp" - mtu = "1420" - } -} - resource "proxmox_lxc" "monitoring" { target_node = "hesh" hostname = "monitoring" @@ -107,6 +79,7 @@ resource "proxmox_lxc" "monitoring" { memory = 1024 start = true onboot = true + startup = "order=3" ssh_public_keys = <<-EOT ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM9ONfhaHpY0bSk3o81H/eEp+UxQ9RCszJ7p3f+rvcpH kdam0@art-sr @@ -137,10 +110,11 @@ resource "proxmox_lxc" "nc_kumar" { password = "${var.nc_kumar_password}" unprivileged = false cores = 8 - cpulimit = 8 + cpulimit = 0 memory = 12288 start = true onboot = true + startup = "order=3" ssh_public_keys = <<-EOT ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM9ONfhaHpY0bSk3o81H/eEp+UxQ9RCszJ7p3f+rvcpH kdam0@art-sr @@ -172,11 +146,12 @@ resource "proxmox_lxc" "plex" { ostemplate = "local:vztmpl/debian-12-standard_12.0-1_amd64.tar.zst" password = "${var.plex_password}" unprivileged = false - cores = 8 - cpulimit = 8 + cores = 4 + cpulimit = 0 memory = 4096 start = true onboot = true + startup = "order=3" ssh_public_keys = <<-EOT ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM9ONfhaHpY0bSk3o81H/eEp+UxQ9RCszJ7p3f+rvcpH kdam0@art-sr @@ -196,7 +171,7 @@ resource "proxmox_lxc" "plex" { network { name = "eth0" bridge = "vmbr1" - tag = 30 + tag = 0 ip = "dhcp" mtu = "1420" } @@ -213,6 +188,7 @@ resource "proxmox_lxc" "vault" { memory = 1024 start = true onboot = true + startup = "order=3" ssh_public_keys = <<-EOT ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM9ONfhaHpY0bSk3o81H/eEp+UxQ9RCszJ7p3f+rvcpH kdam0@art-sr @@ -243,10 +219,11 @@ resource "proxmox_lxc" "torrents" { password = "${var.torrents_password}" unprivileged = false cores = 2 - cpulimit = 2 - memory = 2048 + cpulimit = 0 + memory = 4096 start = true onboot = true + startup = "order=3" ssh_public_keys = <<-EOT ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM9ONfhaHpY0bSk3o81H/eEp+UxQ9RCszJ7p3f+rvcpH kdam0@art-sr @@ -283,6 +260,7 @@ resource "proxmox_lxc" "med_dl" { memory = 2048 start = true onboot = true + startup = "order=3" ssh_public_keys = <<-EOT ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM9ONfhaHpY0bSk3o81H/eEp+UxQ9RCszJ7p3f+rvcpH kdam0@art-sr @@ -307,3 +285,76 @@ resource "proxmox_lxc" "med_dl" { mtu = "1420" } } + +resource "proxmox_vm_qemu" "torrents_2" { + target_node = "hesh" + name = "torrents-2" + memory = 4096 + start_at_node_boot = true + boot = "order=virtio0;net0" + clone_id = 104 + full_clone = true + scsihw = "virtio-scsi-single" + + startup_shutdown { + order = 3 + } + + cpu { + cores = 2 + } + + disk { + type = "disk" + slot = "virtio0" + size = "100G" + storage = "local-lvm" + } + + network { + id = 0 + model = "virtio" + bridge = "vmbr1" + tag = 30 + mtu = 1420 + } +} + +resource "proxmox_vm_qemu" "rproxy_2" { + target_node = "hesh" + name = "rproxy-2" + memory = 1024 + start_at_node_boot = true + boot = "order=virtio0;net0" + clone_id = 104 + full_clone = true + scsihw = "virtio-scsi-single" + + startup_shutdown { + order = 3 + } + + cpu { + cores = 1 + } + + disk { + type = "disk" + slot = "virtio0" + size = "10G" + storage = "local-lvm" + } + + network { + id = 0 + model = "virtio" + bridge = "vmbr1" + tag = 30 + mtu = 1420 + } +} + +moved { + from = proxmox_lxc.nckumar + to = proxmox_lxc.nc_kumar +} diff --git a/terraform/terraform.tf b/terraform/terraform.tf old mode 100644 new mode 100755 index 64842b0..a9463ab --- a/terraform/terraform.tf +++ b/terraform/terraform.tf @@ -1,12 +1,13 @@ terraform { required_providers { proxmox = { - source = "telmate/proxmox" - version = ">=1.0.0" + source = "Telmate/proxmox" + version = "3.0.2-rc07" } } } provider "proxmox" { # Configuration options + pm_tls_insecure = true } diff --git a/terraform/variables.tf b/terraform/variables.tf old mode 100644 new mode 100755 -- cgit v1.2.3