0

my web server generates a shell script with more than 100 lines of code based on complex user selections. I need to orchestrate this over several machines using salt-ssh. what I need is to copy this shell script to remote and execute it from there for all devices. how to achieve this with salt-ssh ?. I can not install minions on the remote device.

Josh Correia
  • 3,807
  • 3
  • 33
  • 50
Haseeb A
  • 5,356
  • 1
  • 30
  • 34

1 Answers1

2

Just as with normal minion. Write a state...

add script:
    file.managed:
    - name: file.sh
    - source: /path/to/file.sh

run script:
    cmd.run:
    - name: file.sh

...and apply it

salt-ssh 'minions*' state.apply mystate.sls

doz10us
  • 765
  • 7
  • 17