ansible_lxd_tests/Playbooks/roles/init_lxd/tasks/main.yml

20 lines
450 B
YAML

---
# tasks file for roles/init_lxd
- name: Install lxd
ansible.builtin.snap:
name: lxd
classic: yes
## tira el lxd init con los parametros
- name: "Preseeding LXD Init with: {{lxd_init_yaml_config_path}}"
become: true
ansible.builtin.shell: |
cat <<EOF | lxd init --preseed
{{ lookup('file', lxd_init_yaml_config_path) }}
EOF
register: lxd_init_output
- ansible.builtin.debug:
var: lxd_init_output
verbosity: 2