我有一个SLS文件;其内容如下:
apache:
pkg.installed:
-name: apache2
service.running:
-enable: True
- require:
- pkg: apache
Run Code Online (Sandbox Code Playgroud)
当尝试使用salt-master为Ubuntu的Vagrant盒子配盐时出现错误:
State 'apache' in SLS 'webserver' is not formed as a list
Run Code Online (Sandbox Code Playgroud)
我尝试对其进行编辑,但我注意到您不能以a结尾的代码块很大,:但是我看不出这是怎么回事。
salt-master在Ubuntu盒子上运行,并且接受密钥。我是新来的盐!
我只是通过在线YAML解析器进行了处理,这似乎还可以。我想念我吗?
小智 5
我不认为您需要双空格缩进,我的作品不需要单行缩进,但在破折号后确实需要空格。
apache:
pkg.installed:
- name: apache2
service.running:
- enable: True
- require:
- pkg: apache
Run Code Online (Sandbox Code Playgroud)