This commit is contained in:
parent
d50bf402af
commit
f33a99ad05
14
ansible/roles/os/tasks/cloud-init.yml
Normal file
14
ansible/roles/os/tasks/cloud-init.yml
Normal 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
|
@ -1,23 +1,11 @@
|
||||
- name: Delete snapd package
|
||||
ansible.builtin.apt:
|
||||
name: snapd
|
||||
state: absent
|
||||
purge: yes
|
||||
- name: Reload systemd unit configurations
|
||||
ansible.builtin.systemd:
|
||||
daemon_reload: yes
|
||||
- name: Remove snapd
|
||||
import_tasks: snapd.yml
|
||||
|
||||
- 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
|
||||
- name: Remove cloud-init
|
||||
import_tasks: cloud-init.yml
|
||||
|
||||
- name: Configure network
|
||||
import_tasks: network.yml
|
||||
|
||||
- name: Install packages
|
||||
import_tasks: packages.yml
|
5
ansible/roles/os/tasks/network.yml
Normal file
5
ansible/roles/os/tasks/network.yml
Normal file
@ -0,0 +1,5 @@
|
||||
- name: Disable & mask networkd-wait-online
|
||||
ansible.builtin.systemd:
|
||||
name: systemd-networkd-wait-online
|
||||
enable: no
|
||||
masked: yes
|
6
ansible/roles/os/tasks/packages.yml
Normal file
6
ansible/roles/os/tasks/packages.yml
Normal file
@ -0,0 +1,6 @@
|
||||
- name: Install additional packages
|
||||
ansible.builtin.apt:
|
||||
name: "{{ item }}"
|
||||
state: latest
|
||||
update_cache: yes
|
||||
loop: "{{ packages }}"
|
8
ansible/roles/os/tasks/snapd.yml
Normal file
8
ansible/roles/os/tasks/snapd.yml
Normal 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
2
ansible/vars/main.yml
Normal file
@ -0,0 +1,2 @@
|
||||
packages:
|
||||
- ansible
|
Loading…
Reference in New Issue
Block a user