diff --git a/metal/main.yml b/metal/main.yml index 2db30341..d874a8d8 100644 --- a/metal/main.yml +++ b/metal/main.yml @@ -18,5 +18,6 @@ roles: - snap - lxd + - tfstate tags: - provision diff --git a/metal/roles/tfstate/tasks/main.yml b/metal/roles/tfstate/tasks/main.yml new file mode 100644 index 00000000..14bc4738 --- /dev/null +++ b/metal/roles/tfstate/tasks/main.yml @@ -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