Hi All,
I have a requirement to login to multiple application servers and just run different scripts individually on different servers
Rather than creating task for each server - I would like to just create one task with name of the shell script in a variable
How can we implement this
Eg :
====inventory file===
===YAML file===
---
- hosts: APP
remote_user: app
tasks:
- name: START APP
shell: |
cd "{{ path }}"
"{{ script }}"
register: result
tags: check
- debug: msg="{{ result.stdout }}"