mirror of
https://github.com/khuedoan/homelab.git
synced 2025-02-26 06:29:58 +07:00
Terraform state etcd in LXD instead of Docker
This commit is contained in:
parent
0bbb87169f
commit
a69acb8134
@ -18,5 +18,6 @@
|
|||||||
roles:
|
roles:
|
||||||
- snap
|
- snap
|
||||||
- lxd
|
- lxd
|
||||||
|
- tfstate
|
||||||
tags:
|
tags:
|
||||||
- provision
|
- provision
|
||||||
|
22
metal/roles/tfstate/tasks/main.yml
Normal file
22
metal/roles/tfstate/tasks/main.yml
Normal 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
|
Loading…
Reference in New Issue
Block a user