SaltStack:SLS sshd 中必需的声明文件 /etc/ssh/sshd_config 未形成为单键字典
SaltStack: Requisite declaration file /etc/ssh/sshd_config in SLS sshd is not formed as a single key dictionary
我收到此错误消息:
Requisite declaration file /etc/ssh/sshd_config in SLS monitoring.sshd is not formed as a single key dictionary
这里是 sls 文件:
sshd:
service.running:
- watch:
- file /etc/ssh/sshd_config
file.replace:
- name: /etc/ssh/sshd_config
- repl: PermitUserEnvironment yes
- pattern: ^.*PermitUserEnvironment.*$
sls 文件中有错字。在 file
和 /etc/ssh/sshd_config
之间添加 :
后,它起作用了。
这是有效的 sls 文件:
sshd:
service.running:
- watch:
- file: /etc/ssh/sshd_config
file.replace:
- name: /etc/ssh/sshd_config
- repl: PermitUserEnvironment yes
- pattern: ^.*PermitUserEnvironment.*$
我收到此错误消息:
Requisite declaration file /etc/ssh/sshd_config in SLS monitoring.sshd is not formed as a single key dictionary
这里是 sls 文件:
sshd:
service.running:
- watch:
- file /etc/ssh/sshd_config
file.replace:
- name: /etc/ssh/sshd_config
- repl: PermitUserEnvironment yes
- pattern: ^.*PermitUserEnvironment.*$
sls 文件中有错字。在 file
和 /etc/ssh/sshd_config
之间添加 :
后,它起作用了。
这是有效的 sls 文件:
sshd:
service.running:
- watch:
- file: /etc/ssh/sshd_config
file.replace:
- name: /etc/ssh/sshd_config
- repl: PermitUserEnvironment yes
- pattern: ^.*PermitUserEnvironment.*$