Terraform state etcd in LXD instead of Docker

This commit is contained in:
Khue Doan 2021-04-24 18:02:19 +07:00
parent 0bbb87169f
commit a69acb8134
2 changed files with 23 additions and 0 deletions

View File

@ -18,5 +18,6 @@
roles:
- snap
- lxd
- tfstate
tags:
- provision

View File

@ -0,0 +1,22 @@
- name: Create a tfstate container
delegate_to: localhost
lxd_container:
name: tfstate
state: started
source:
type: image
mode: pull
server: https://images.linuxcontainers.org
alias: ubuntu/focal/amd64
wait_for_ipv4_addresses: yes
url: "https://{{ hostvars[groups['metal'][0]]['ansible_host'] }}:8443"
devices:
eth0:
type: nic
nictype: macvlan
parent: eno1
# - ansible.builtin.raw: dpkg -s python
# delegate_to: tfstate
# apt install -y etcd