diff --git a/.drone.yml b/.drone.yml index 80d783e..3e72916 100644 --- a/.drone.yml +++ b/.drone.yml @@ -26,7 +26,7 @@ steps: sed -i -e "s/<>/$${SSH_PASSWORD}/g" \ packer/preseed/UbuntuServer20.04/user-data - | - yamllint -d "{extends: relaxed, rules: {line-length: disable}}" ansible packer/preseed/UbuntuServer20.04/user-data + yamllint -d "{extends: relaxed, rules: {line-length: disable}}" ansible packer/preseed/UbuntuServer20.04/user-data scripts - | packer init -upgrade \ ./packer diff --git a/ansible/roles/os/tasks/main.yml b/ansible/roles/os/tasks/main.yml index 644dbec..acb9dba 100644 --- a/ansible/roles/os/tasks/main.yml +++ b/ansible/roles/os/tasks/main.yml @@ -2,21 +2,22 @@ ansible.builtin.apt: name: snapd state: absent + purge: yes - name: Reload systemd unit configurations ansible.builtin.systemd: daemon_reload: yes -# - 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: 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