我正在用盐栈建立一个DNS服务器。但是env=base在哪里出了问题
首先,运行salt 'ubuntu‘state.apply dnsinstall:
ubuntu:
ID: install bind9
Function: pkg.installed
Name: bind9
Result: True
Comment: The following packages were installed/updated: bind9
Started: 02:40:06.590171
Duration: 14219.3 ms
Changes:
----------
bind9:
----------
new:
1:9.10.3.dfsg.P4-8ubuntu1.15
old:
bind9utils:
----------
new:
1:9.10.3.dfsg.P4-8ubuntu1.15旧:
ID: install bind9utils
Function: pkg.installed
Name: bind9utils
Result: True
Comment: Package bind9utils is already installed
Started: 02:40:20.816659
Duration: 277.111 ms更改:
ID: install bind9_doc
Function: pkg.installed
Name: bind9-doc
Result: True
Comment: The following packages were installed/updated: bind9-doc
Started: 02:40:21.094023
Duration: 4857.395 ms
Changes:
----------
bind9-doc:
----------
new:
1:9.10.3.dfsg.P4-8ubuntu1.15
old:给ubuntu的摘要
成功:3 (changed=2)
失败:0
总运行状态:3总运行时间: 19.354 s
但是当我第二次运行相同的代码时:
ubuntu:
数据无法编译:
No matching SLS found for 'dnsinstall.sls' in env 'base'我还制作了一个file.managed以推送到配置文件,并且也遇到了同样的问题:
quan@quanlm:/srv/ salt $ sudo salt '*‘state.apply dnsconfig.sls
ubuntu:
Data failed to compile:No matching sls found for 'dnsconfig.sls' in env 'base'但当我尝试运行这一行时:
数独盐运行fileserver.file_list saltenv=base
saltenv=base包含这些文件
我的dnsconfig.sls
部署配置文件:
file.managed:
- name: /etc/bindnamed.conf.options
- source: salt://named.conf.options
- mode: 644我的dnsinstall.sls
安装bind9:
pkg.installed:
- pkgs:
- bind9
- bind9utils
- bind9-doc我错了,我不明白为什么它不能正常工作
发布于 2019-09-22 13:34:37
这是我经典的“假期归来”的错误.在运行命令时,您可能不包括文件扩展名:
No matching SLS found for 'dnsinstall.sls'我想您使用了以下命令行:
Salt ubuntu state.apply dnsinstall.sls当你应该使用:
Salt ubuntu state.apply dnsinstall注意第二个和正确调用中缺少的.sls。
https://stackoverflow.com/questions/58021310
复制相似问题