aboutsummaryrefslogtreecommitdiff
path: root/opentofu
diff options
context:
space:
mode:
authorclyhtsuriva <aimeric@adjutor.xyz>2025-02-03 22:54:35 +0100
committerclyhtsuriva <aimeric@adjutor.xyz>2025-02-03 22:54:35 +0100
commit834feb58bdcbd448714888147e1db4421270ba93 (patch)
tree9080305b3be6c0303510510814722712aec64f3e /opentofu
parentab5c6e6d2c0f974a94bc0353908ff65cb9f88202 (diff)
opentofu&ansible: add `become` to `ansible_provisioner` & open k8s ports
Diffstat (limited to 'opentofu')
-rwxr-xr-xopentofu/inventory.ini14
-rw-r--r--opentofu/modules/ansible_provisioner/main.tf2
-rw-r--r--opentofu/plan.outbin9767 -> 0 bytes
3 files changed, 1 insertions, 15 deletions
diff --git a/opentofu/inventory.ini b/opentofu/inventory.ini
deleted file mode 100755
index f00a94a..0000000
--- a/opentofu/inventory.ini
+++ /dev/null
@@ -1,14 +0,0 @@
-[kube_control_plane]
-192.168.1.86
-
-[etcd]
-192.168.1.86
-
-[kube_node]
-192.168.1.84
-192.168.1.85
-
-
-[k8s_cluster:children]
-kube_control_plane
-kube_node
diff --git a/opentofu/modules/ansible_provisioner/main.tf b/opentofu/modules/ansible_provisioner/main.tf
index 54e3346..cac666d 100644
--- a/opentofu/modules/ansible_provisioner/main.tf
+++ b/opentofu/modules/ansible_provisioner/main.tf
@@ -17,7 +17,7 @@ resource "null_resource" "ansible_provisioner" {
provisioner "local-exec" {
command = <<-EOT
- ANSIBLE_HOST_KEY_CHECKING=False ANSIBLE_CONFIG=${path.root}/../ansible/ansible.cfg ansible-playbook \
+ ANSIBLE_HOST_KEY_CHECKING=False ANSIBLE_CONFIG=${path.root}/../ansible/ansible.cfg ansible-playbook -b -v \
-i ${var.inventory_file_path != null ? var.inventory_file_path : "${var.vm_ip},"} \
-u ${var.vm_username} \
--private-key ${var.ssh_private_key_path} \
diff --git a/opentofu/plan.out b/opentofu/plan.out
deleted file mode 100644
index a295e16..0000000
--- a/opentofu/plan.out
+++ /dev/null
Binary files differ