Saltstack:向top.sls添加salt子目录

时间:2014-11-14 10:51:46

标签: python salt-stack

top.sls文件中的

,如何声明子目录?

我想调用那些文件/目录(在top.sls中):

myHost salt # ls states/rcc/env_py/*
states/rcc/env_py/env.py.template  states/rcc/env_py/init.sls

所以我添加了salt:// states / rcc / env_py就像这样

myHost salt # cat top.sls 
base:
  '*':
    - webserver
    - salt://states/rcc/env_py

我遇到了这个错误:

    Data failed to compile:
----------
    No matching sls found for 'salt://states/rcc/env_py' in env 'base'

执行后:

salt  '*' state.highstate

1 个答案:

答案 0 :(得分:2)

更改:

salt://states/rcc/env_py

states/rcc/env_py/

解决了我的问题。