Update playbook to ask for name of package to be installed

This commit is contained in:
2023-11-19 16:55:08 +05:30
parent 807b6d2c40
commit fff203a079

13
install-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 installed"
private: no
tasks:
- name: Install a package
apt:
update_cache: true
name: "{{ package_name }}"
state: present