diff --git a/infra/terraform.tf b/infra/terraform.tf index aa1cf327..623d67b9 100644 --- a/infra/terraform.tf +++ b/infra/terraform.tf @@ -1,9 +1,11 @@ terraform { # TODO (feature) Generate endpoint automatically (terragrunt for variable) - #backend "etcdv3" { - # endpoints = ["192.168.1.110:2379"] - # lock = true - #} + backend "etcdv3" { + endpoints = [ + "192.168.1.110:23799" + ] + lock = true + } required_providers { rke = { diff --git a/metal/roles/tfstate/tasks/main.yml b/metal/roles/tfstate/tasks/main.yml index ef6608d4..b6b8b087 100644 --- a/metal/roles/tfstate/tasks/main.yml +++ b/metal/roles/tfstate/tasks/main.yml @@ -1,3 +1,7 @@ +- name: Install Python library for the Docker + dnf: + name: python-docker + - name: Create etcd container docker_container: name: etcd-tfstate @@ -6,6 +10,6 @@ env: ALLOW_NONE_AUTHENTICATION: "yes" published_ports: - - 2379:2379 + - 23799:2379 volumes: - tfstate:/bitnami/etcd/data