Playbook to manage state of package

This commit is contained in:
2023-11-26 20:29:15 +05:30
parent aa095f7d6b
commit 3e5ca02fe9

View File

@@ -0,0 +1,15 @@
---
- hosts: all
become: true
vars_prompt:
- name: package_name
prompt: "Enter the name of package to be installed"
private: no
- name: state
prompt: "State"
private: no
tasks:
- name: Modify state of package
ansible.builtin.package:
name: "{{ package_name }}"
state: "{{ state }}"