From a2b26eba26b9ab8e48252cfd885ca1a5f22192e0 Mon Sep 17 00:00:00 2001 From: aggarwalakshun Date: Wed, 18 Sep 2024 19:39:31 +0000 Subject: [PATCH] add nodes var --- playbooks/run-local-script.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/playbooks/run-local-script.yml b/playbooks/run-local-script.yml index 023fe22..a5ddb11 100644 --- a/playbooks/run-local-script.yml +++ b/playbooks/run-local-script.yml @@ -1,9 +1,13 @@ --- -- hosts: all +- hosts: "{{ nodes }}" + become: true vars_prompt: - name: path prompt: "Enter path to script" private: no + - name: nodes + prompt: "Enter hosts to run script on" + private: no tasks: - name: Execute script script: "{{ path }}"