2022-07-17 01:24:18 -03:00
|
|
|
# ansible-playbook Playbooks/01-UBUNTU-LXD.yml -i Inventories/QA --ask-become-pass
|
|
|
|
|
|
|
|
- hosts: ubuntu_lxd
|
2022-07-16 23:28:28 -03:00
|
|
|
vars:
|
|
|
|
sudoers:
|
|
|
|
- lxd
|
2022-07-17 01:24:18 -03:00
|
|
|
gather_facts: true
|
2022-07-16 23:28:28 -03:00
|
|
|
tasks:
|
|
|
|
#- ansible.builtin.include_role: name=new_sudoers_user
|
|
|
|
- name: Install packages
|
|
|
|
ansible.builtin.package:
|
|
|
|
name: "{{item}}"
|
|
|
|
state: present
|
|
|
|
with_items:
|
|
|
|
- "ansible"
|
|
|
|
- "zfsutils-linux"
|
|
|
|
|
2022-07-17 01:24:18 -03:00
|
|
|
- ansible.builtin.include_role:
|
2022-07-19 10:22:58 -03:00
|
|
|
name: init_lxd
|
2022-07-17 01:24:18 -03:00
|
|
|
#vars:
|
2022-07-17 01:35:08 -03:00
|
|
|
# - lxd_init_template_config_path="/path/to/my/custom/template"
|
2022-07-17 01:24:18 -03:00
|
|
|
|
|
|
|
## Rollback
|
|
|
|
- hosts: ubuntu_lxd
|
|
|
|
tags:
|
|
|
|
- rollback
|
|
|
|
tasks:
|
|
|
|
- shell: "snap remove --purge lxd"
|
|
|
|
become: true
|
2022-07-19 10:22:58 -03:00
|
|
|
- name: Install packages
|
|
|
|
ansible.builtin.package:
|
|
|
|
name: "{{item}}"
|
|
|
|
state: absent
|
|
|
|
with_items:
|
|
|
|
- "ansible"
|
|
|
|
- "zfsutils-linux"
|
2022-07-16 23:28:28 -03:00
|
|
|
|