From fff203a079db0f3f61581a2938e901cbdd3ad29e Mon Sep 17 00:00:00 2001 From: Akshun Date: Sun, 19 Nov 2023 16:55:08 +0530 Subject: [PATCH] Update playbook to ask for name of package to be installed --- install-package.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 install-package.yml diff --git a/install-package.yml b/install-package.yml new file mode 100644 index 0000000..443c4b8 --- /dev/null +++ b/install-package.yml @@ -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