REFACTOR: files fixed according to ansible-lint

This commit is contained in:
2026-07-12 15:36:55 +00:00
parent 9a9bfa7e23
commit d1568586e9
8 changed files with 69 additions and 58 deletions
@@ -2,26 +2,30 @@
# Remove multiple packages at once
- name: Remove unnecessary packages
remote_user: ansible
when: (ansible_facts['distribution'] == "Debian") or
when: (ansible_facts['distribution'] == "Debian") or
(ansible_facts['distribution'] == "Ubuntu")
apt:
ansible.builtin.apt:
name:
- nano
state: absent
become: yes
become: true
# Clean up all orphaned packages
- name: Remove all orphaned dependencies
remote_user: ansible
when: (ansible_facts['distribution'] == "Debian") or
when: (ansible_facts['distribution'] == "Debian") or
(ansible_facts['distribution'] == "Ubuntu")
apt:
autoremove: yes
purge: yes
ansible.builtin.apt:
autoremove: true
purge: true
- name: Install sudo package on Alpine
remote_user: ansible
when: (ansible_facts['distribution'] == "Alpine")
command: /sbin/apk del nano
community.general.apk:
name:
- nano
state: absent
become: true