0
我試圖使用salt-ssh
與file.managed
模塊將文件從我的salt主文件複製到minon。但它是從/etc/salt/master
給下面的錯誤...slat-ssh在env'base'中找不到與'copy.sls'匹配的sls
[salt]# pwd
/srv/salt
[salt]# ls -l
total 20
-rw-r--r-- 1 root root 80 Sep 4 21:37 copy.sls
-rw-r--r-- 1 root root 47 Sep 3 04:52 lftp_install.sls
-rw-r--r-- 1 root root 44 Sep 3 04:52 lftp_remove.sls
-rw-r--r-- 1 root root 124 Sep 3 04:50 lftp.sls
-rw-r--r-- 1 root root 65 Sep 3 04:53 Service_check.sls
[salt]# cat copy.sls
add script:
file.managed:
- name: testSalt
- source: /root/testSalt
- dest: /tmp/testSalt
項
file_roots:
base:
- /srv/salt
[鹽]#鹽-SSH 'KK' state.apply copy.sls
KK:
- No matching sls found for 'copy.sls' in env 'base'
When i ran this into the debug mode, it gives as follows..
[DEBUG ] Could not find file from saltenv 'base', 'salt://copy/sls.sls'
[DEBUG ] Could not find file from saltenv 'base', 'salt://copy/sls/init.sls'
[DEBUG ] LazyLoaded nested.output
KK:
- No matching sls found for 'copy.sls' in env 'base'
始終使用YAML皮棉檢查,以驗證沒有標籤和空間上的縮進的組合。在遇到不正確的yaml語法時,Saltstack並不總是顯示正確的異常錯誤。 – mootmoot
我檢查了一下,我沒有看到任何縮進或標籤空間! – rockypy17
嘿,你的top.sls在哪裏? – mootmoot