FAQ

On Wed, Nov 19, 2014 at 3:44 PM, EL Amri Aymen wrote:
To test salt-stack I would like to copy a config file to another distant one
(I am testing master and minion in localhost)

/etc/salt/minion :
master: 127.0.0.1
file_roots:
base:
- /srv/salt/base
file_roots is a master setting.
/etc/salt/master:
interface: 0.0.0.0
The /srv/salt tree :
# tree srv/
srv/
├── salt
│ └── base
│ └── env
│ ├── envpy.template
│ └── init.sls
└── top.sls
and the template file :
# cat /srv/salt/base/env/envpy.template
This is a test !
and this is the init file:
# cat /srv/salt/base/env/init.sls

/home/myHome/env.py:
file:
- managed
- source: salt://base/env/envpy.template
Since you defined file_roots like you did, this should be
salt://env/envpy.template
and finally the top file:
# cat /srv/salt/top.sls
base:
'*':
- base.env
Since you defined file_roots like you did, this should be in
/srv/salt/base/top.sls
Running salt highstate:
# salt '*' state.highstate
myHost:
----------
ID: states
Function: no.None
Result: False
Comment: No Top file or external nodes data matches found
Started:
Duration:
Changes:

Summary
------------
Succeeded: 0
Failed: 1
------------
Total states run: 1
Do you have any idea why I've got this error ?
Not really with the config you have... But either try the same after
removing file_roots from minion config, or try with the changes I
suggested after moving file_roots to master config.
--
viq

--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 2 of 3 | next ›
Discussion Overview
groupsalt-users @
postedNov 19, '14 at 2:44p
activeNov 20, '14 at 10:20a
posts3
users2

2 users in discussion

EL Amri Aymen: 2 posts Viq: 1 post

People

Translate

site design / logo © 2022 Grokbase