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
|
- 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
|
|
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