Skip to content

Commit

Permalink
Removed state
Browse files Browse the repository at this point in the history
  • Loading branch information
jinglemansweep committed Feb 16, 2024
1 parent 62e66af commit ceba872
Show file tree
Hide file tree
Showing 11 changed files with 47 additions and 181 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
.terraform
*.tfstate*
**/*.tfstate*
14 changes: 0 additions & 14 deletions terraform/files/sections/base.yml

This file was deleted.

14 changes: 0 additions & 14 deletions terraform/files/sections/base_hetzner.yml

This file was deleted.

6 changes: 6 additions & 0 deletions terraform/files/sections/disk_sd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
variant: flatcar
version: 1.0.0

storage:
disks:
- device: /dev/sdb
11 changes: 11 additions & 0 deletions terraform/files/sections/disk_vm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
variant: flatcar
version: 1.0.0

storage:
disks:
- device: /dev/vdb
partitions:
- number: 1
label: mnt_data
resize: true
size_mib: 0
21 changes: 6 additions & 15 deletions terraform/files/sections/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,6 @@ variant: flatcar
version: 1.0.0

storage:
disks:
- device: /dev/vdb
partitions:
- number: 1
label: mnt_data
resize: true
size_mib: 0

filesystems:
- path: /mnt/data
device: /dev/disk/by-partlabel/mnt_data
format: ext4
wipe_filesystem: false
label: mnt_data
with_mount_unit: true

files:
- path: /etc/docker/daemon.json
Expand All @@ -35,7 +20,13 @@ storage:
overwrite: true

systemd:

units:
- name: docker.service
enabled: true


passwd:
users:
- name: louis
groups: [docker"]
12 changes: 12 additions & 0 deletions terraform/files/sections/fs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
variant: flatcar
version: 1.0.0

storage:

filesystems:
- path: /mnt/data
device: /dev/disk/by-partlabel/mnt_data
format: ext4
wipe_filesystem: false
label: mnt_data
with_mount_unit: true
2 changes: 1 addition & 1 deletion terraform/files/sections/users.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ passwd:
ssh_authorized_keys:
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDAPME1Cu6epBXHCAI6pRjhuWC5HprHsqLlrokNRqdpcd/yKvP4KauPGKzZpshG9P/EUJ/ZYCh1diD4CUZgkzY54n2GuDmfxqsnhjkdI9g8Ceu1VsXTLwvW62BVDQgXaVBhds9rd+f+DTIEMqQvCnwkWSnMCPTY/+mi4PqireJgdQ18UXkSGjWtbDb+BgJB9BLI61Wx+eoKe8JMjJjoRhV1xxinS1XlghATh9onddaM6k1uVuLi8hQRYRqbrBwUQ21P+pLQbe6XJLdw65jnThSH/9BJ59ePqpWS+H43fzl9iAyyZFoBV9IVT+P4roEIAIIs1O4Kp02R09azbml8JkON louis@home
password_hash: "$6$4DcadFC0.wM$.3jy/J4hsDnP55ehJM2zTEWyCrrc.O7m3N2/j2Zohel8n1qQJM73mwmHFFOyuTbp8eZH4XReUyzE1EbyqXx/b."
groups: [sudo, docker]
groups: [sudo]
10 changes: 0 additions & 10 deletions terraform/files/sections/users_test.yml

This file was deleted.

15 changes: 10 additions & 5 deletions terraform/main.tf
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
data "ct_config" "swarm_manager" {
content = file("files/sections/base.yml")
content = file("files/sections/disk_vm.yml")
strict = true
pretty_print = false

snippets = [
file("files/sections/fs.yml"),
# Sections
file("files/sections/users.yml"),
file("files/sections/docker.yml"),
Expand All @@ -12,11 +13,12 @@ data "ct_config" "swarm_manager" {
}

data "ct_config" "swarm_worker" {
content = file("files/sections/base.yml")
content = file("files/sections/disk_vm.yml")
strict = true
pretty_print = false

snippets = [
file("files/sections/fs.yml"),
# Sections
file("files/sections/users.yml"),
file("files/sections/docker.yml"),
Expand All @@ -25,11 +27,12 @@ data "ct_config" "swarm_worker" {
}

data "ct_config" "plex" {
content = file("files/sections/base.yml")
content = file("files/sections/disk_vm.yml")
strict = true
pretty_print = false

snippets = [
file("files/sections/fs.yml"),
# Sections
file("files/sections/users.yml"),
file("files/sections/docker.yml"),
Expand All @@ -38,12 +41,14 @@ data "ct_config" "plex" {
}

data "ct_config" "hetzner" {
content = file("files/sections/base_hetzner.yml")
content = file("files/sections/disk_sd.yml")
strict = true
pretty_print = false

snippets = [
file("files/sections/fs.yml"),
# Sectionss
file("files/sections/users_test.yml")
file("files/sections/users.yml"),
file("files/sections/docker.yml"),
]
}
121 changes: 0 additions & 121 deletions terraform/terraform.tfstate

This file was deleted.

0 comments on commit ceba872

Please sign in to comment.