Playbook to remove package

This commit is contained in:
2023-11-19 16:56:14 +05:30
parent fff203a079
commit 8eb8a5688c

13
remove-package.yml Normal file
View File

@@ -0,0 +1,13 @@
---
- hosts: all
become: true
vars_prompt:
- name: package_name
prompt: "Enter the name of package to be removed"
private: no
tasks:
- name: Remove a package
apt:
name: "{{ package_name }}"
state: absent
autoremove: true