Thorben Croisé
Thorben Croisé

Reputation: 12870

Copy local file in Saltstack

I am in a masterless salt-minion, but I would like to manage a file locally. How do I copy a local file around in an Saltstack .sls file?

E.g. something like

/etc/mymodule/proxy.conf:
  file.managed:
    - source: /mymodule.conf

Upvotes: 2

Views: 5537

Answers (1)

uvsmtid
uvsmtid

Reputation: 4295

I guess you want to take a look at file.copy instead of file.managed.

State file.managed uses source key to download content from URI (can be salt://, http://, etc.) - it won't intelligently guess that, if there is no URI scheme in source value, then it should use local path on the minion it runs at.

Upvotes: 2

Related Questions