Fix can't create tfstate container

This commit is contained in:
Khue Doan 2021-06-08 20:37:39 +07:00
parent f7a02d99b3
commit 9b458435e0
2 changed files with 11 additions and 5 deletions

View File

@ -1,9 +1,11 @@
terraform { terraform {
# TODO (feature) Generate endpoint automatically (terragrunt for variable) # TODO (feature) Generate endpoint automatically (terragrunt for variable)
#backend "etcdv3" { backend "etcdv3" {
# endpoints = ["192.168.1.110:2379"] endpoints = [
# lock = true "192.168.1.110:23799"
#} ]
lock = true
}
required_providers { required_providers {
rke = { rke = {

View File

@ -1,3 +1,7 @@
- name: Install Python library for the Docker
dnf:
name: python-docker
- name: Create etcd container - name: Create etcd container
docker_container: docker_container:
name: etcd-tfstate name: etcd-tfstate
@ -6,6 +10,6 @@
env: env:
ALLOW_NONE_AUTHENTICATION: "yes" ALLOW_NONE_AUTHENTICATION: "yes"
published_ports: published_ports:
- 2379:2379 - 23799:2379
volumes: volumes:
- tfstate:/bitnami/etcd/data - tfstate:/bitnami/etcd/data