ansible_lxd_tests/Playbooks/01-UBUNTU-LXD.yml

47 lines
1.1 KiB
YAML
Raw Normal View History

2022-07-28 20:52:07 -03:00
# ansible-playbook Playbooks/01-UBUNTU-LXD.yml -i Inventories/QA -v -t 'deploy' --become-password-file .sudo_pass
2022-07-17 01:24:18 -03:00
- hosts: ubuntu_lxd
2022-07-28 20:52:07 -03:00
gather_facts: false
tags:
- deploy
become: true
2022-07-16 23:28:28 -03:00
tasks:
2022-07-28 20:52:07 -03:00
- name: Update, Upgrade & Install dependencies
become: true
block:
- apt: update_cache=yes upgrade=full
- ansible.builtin.package: name="{{item}}" state=present
with_items:
- ansible
- zfsutils-linux
- python3-pip
- lxc
- build-essential
- autoconf
- libtool
- pkg-config
- idle-python2.7
- libgle3
- terraform
- ansible.builtin.include_role: name=init_lxd
- pip: name=pylxd
- script: Playbooks/files/OpenLDAP.py
2022-07-16 23:28:28 -03:00
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
2022-07-28 20:52:07 -03:00
become: true
tasks:
2022-07-17 01:24:18 -03:00
- shell: "snap remove --purge lxd"
2022-07-28 20:52:07 -03:00
- pip: name=lxc-python2 state=absent
- ansible.builtin.package: name="{{item}}" state=absent
2022-07-19 10:22:58 -03:00
with_items:
- "ansible"
- "zfsutils-linux"
2022-07-28 20:52:07 -03:00
- "python3-pip"
- "lxc"