创建自己的 sls 文件并尝试将其同步到 minions 时,它会响应错误:
错误:生成 repo db 时发生错误。附加信息如下:
failed: 1 failed_list: ---------- salt-winrepo-ng\wget.sls: - package 'wget', repo data for version number full_name is not defined as a dictionary - package 'wget', repo data for version number installer is not defined as a dictionary - package 'wget', repo data for version number install_flags is not defined as a dictionary - package 'wget', repo data for version number uninstaller is not defined as a dictionary - package 'wget', repo data for version number uninstall_flags is not defined as a dictionary - package 'wget', repo data for version number msiexec is not defined as a dictionary - package 'wget', repo data for version number locale is not defined as a dictionary - package 'wget', repo data for version number reboot is not defined as a dictionary"
SLS的内容是:
# just 32-bit x86 installer available
{% if grains['cpuarch'] == 'AMD64' %}
{% set PROGRAM_FILES = "%ProgramFiles(x86)%" %}
{% else %}
{% set PROGRAM_FILES = "%ProgramFiles%" %}
{% endif %}
wget:
full_name: 'wget'
installer: 'http://downloads.sourceforge.net/gnuwin32/wget-1.11.4-1-setup.exe'
install_flags: '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART'
uninstaller: '{{ PROGRAM_FILES }}\GnuWin32\uninstall\unins001.exe'
uninstall_flags: '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART'
msiexec: False
locale: en_US
reboot: Fals
从给定的 sls 文件的内容来看,这是“ windows 软件存储库的包定义”。
如果您查看此类描述的示例:
然后您可以立即看到您的文件在层次结构中缺少一项,带有版本号。
即,不应该是:
A: