Morozzko
Morozzko

Reputation: 1

SALT STACK copy folder from master to windows minion

I am trying to copy folder from master to minions on windows to 'C:\Deploy' folder. What have I done wrong

copy:
  file.recurse:
    - source: /srv/salt/1/
    - target: C:/Deploy/
    - makedirs: True
# salt 'min*' state.sls copy
minion27:
----------
          ID: copy
    Function: file.recurse
      Result: False
     Comment: Specified file copy is not an absolute path
     Started: 10:33:12.302024
    Duration: 0.0 ms
     Changes:

Upvotes: 0

Views: 1057

Answers (1)

RogueOverride
RogueOverride

Reputation: 112

You can use salt://1 where salt:// points to /srv/salt. This is the general practice to use. When you refer to /srv/salt/1 it is trying to refer to that place on the minion. Since states are executed on the minion, you have to tell it that we want it to refer back to the master.

Upvotes: 1

Related Questions