add support for ubuntu

This commit is contained in:
2024-04-29 18:28:37 +05:30
parent bd443663bd
commit b4eddd856d

View File

@@ -11,11 +11,13 @@
prompt: "State" prompt: "State"
private: no private: no
tasks: tasks:
- name: Modify state of package in debian - name: Modify state of package in debian and ubuntu
tags: debian tags: debian
apt: apt:
name: "{{ package_name }}" name: "{{ package_name }}"
update_cache: yes update_cache: yes
state: "{{ state}}" state: "{{ state}}"
autoremove: yes autoremove: yes
when: ansible_distribution == 'Debian' when:
- ansible_distribution == 'Debian'
- ansible_distribution == 'Ubuntu'