Extend ansible playbook
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Danny Bessems 2021-06-08 21:27:08 +02:00
parent d50bf402af
commit f33a99ad05
6 changed files with 45 additions and 22 deletions

View File

@ -0,0 +1,14 @@
- name: Delete cloud-init package
ansible.builtin.apt:
name: cloud-init
state: absent
purge: yes
# autoclean: yes
# autoremove: yes
- name: Delete cloud-init files
ansible.builtin.file:
path: "{{ item }}"
state: absent
loop:
- /etc/cloud
- /var/lib/cloud

View File

@ -1,23 +1,11 @@
- name: Delete snapd package - name: Remove snapd
ansible.builtin.apt: import_tasks: snapd.yml
name: snapd
state: absent
purge: yes
- name: Reload systemd unit configurations
ansible.builtin.systemd:
daemon_reload: yes
- name: Delete cloud-init package - name: Remove cloud-init
ansible.builtin.apt: import_tasks: cloud-init.yml
name: cloud-init
state: absent - name: Configure network
purge: yes import_tasks: network.yml
# autoclean: yes
# autoremove: yes - name: Install packages
- name: Delete cloud-init files import_tasks: packages.yml
ansible.builtin.file:
path: "{{ item }}"
state: absent
loop:
- /etc/cloud
- /var/lib/cloud

View File

@ -0,0 +1,5 @@
- name: Disable & mask networkd-wait-online
ansible.builtin.systemd:
name: systemd-networkd-wait-online
enable: no
masked: yes

View File

@ -0,0 +1,6 @@
- name: Install additional packages
ansible.builtin.apt:
name: "{{ item }}"
state: latest
update_cache: yes
loop: "{{ packages }}"

View File

@ -0,0 +1,8 @@
- name: Delete snapd package
ansible.builtin.apt:
name: snapd
state: absent
purge: yes
- name: Reload systemd unit configurations
ansible.builtin.systemd:
daemon_reload: yes

2
ansible/vars/main.yml Normal file
View File

@ -0,0 +1,2 @@
packages:
- ansible