Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set overwrite flag for anything under /etc to play with latest ignition #222

Merged
merged 1 commit into from
Nov 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions terraform/ignition/ignition.tf
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# wiresteward
data "ignition_file" "wiresteward_config" {
count = local.instance_count
path = "/etc/wiresteward/config.json"
mode = 256
count = local.instance_count
path = "/etc/wiresteward/config.json"
mode = 256
overwrite = true

content {
content = templatefile("${path.module}/resources/wiresteward-config.json.tmpl", {
Expand Down Expand Up @@ -41,9 +42,10 @@ data "ignition_systemd_unit" "s3fs" {

# traefik
data "ignition_file" "traefik_config" {
count = local.instance_count
path = "/etc/traefik/wiresteward-proxy.toml"
mode = 256
count = local.instance_count
path = "/etc/traefik/wiresteward-proxy.toml"
mode = 256
overwrite = true

content {
content = templatefile("${path.module}/resources/wiresteward-proxy.toml.tmpl", {
Expand Down
5 changes: 3 additions & 2 deletions terraform/matchbox/dns.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
data "ignition_file" "resolved_conf" {
path = "/etc/systemd/resolved.conf"
mode = 420
path = "/etc/systemd/resolved.conf"
mode = 420
overwrite = true

content {
content = <<-EOF
Expand Down
7 changes: 4 additions & 3 deletions terraform/matchbox/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@ data "ignition_filesystem" "root" {
}

data "ignition_file" "hostname" {
count = length(var.wiresteward_server_peers)
path = "/etc/hostname"
mode = 420
count = length(var.wiresteward_server_peers)
path = "/etc/hostname"
mode = 420
overwrite = true

content {
content = <<EOS
Expand Down
25 changes: 15 additions & 10 deletions terraform/matchbox/net.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
data "ignition_file" "bond_net_eno" {
path = "/etc/systemd/network/00-eno.network"
mode = 420
path = "/etc/systemd/network/00-eno.network"
mode = 420
overwrite = true

content {
content = <<EOS
Expand All @@ -17,8 +18,9 @@ EOS
}

data "ignition_file" "bond_netdev" {
path = "/etc/systemd/network/10-bond0.netdev"
mode = 420
path = "/etc/systemd/network/10-bond0.netdev"
mode = 420
overwrite = true

content {
content = <<EOS
Expand All @@ -35,8 +37,9 @@ EOS
data "ignition_file" "bond_public_vlan_netdev" {
count = length(var.wiresteward_server_peers)

path = "/etc/systemd/network/12-bond-public-vlan.netdev"
mode = 420
path = "/etc/systemd/network/12-bond-public-vlan.netdev"
mode = 420
overwrite = true

content {
content = <<EOS
Expand All @@ -53,8 +56,9 @@ EOS
data "ignition_file" "bond0" {
count = length(var.wiresteward_server_peers)

path = "/etc/systemd/network/20-bond0.network"
mode = 420
path = "/etc/systemd/network/20-bond0.network"
mode = 420
overwrite = true

content {
content = <<EOS
Expand All @@ -78,8 +82,9 @@ EOS
data "ignition_file" "bond0_public_vlan" {
count = length(var.wiresteward_server_peers)

path = "/etc/systemd/network/22-bond0-public-vlan.network"
mode = 420
path = "/etc/systemd/network/22-bond0-public-vlan.network"
mode = 420
overwrite = true

content {
content = <<EOS
Expand Down