Use apt instead of nala

This commit is contained in:
2023-12-28 18:45:34 +05:30
parent 4e03962446
commit 4cc0137278

View File

@@ -14,9 +14,10 @@
name: "{{ package_name }}"
state: "{{ state }}"
when: ansible_distribution == 'Fedora'
- name: Install package in debian
command: sudo nala install "{{ package_name }}" -y
when: ansible_distribution == 'Debian' and "{{ state }}" == 'present'
- name: Remove package in debian
command: sudo nala remove "{{ package_name }}" -y
when: ansible_distribution == 'Debian' and "{{ state }}" == 'absent'
- name: Modify state of package in debian
apt:
name: "{{ package_name }}"
update_cache: yes
state: "{{ state}}"
autoremove: yes
when: ansible_distribution == 'Debian'