salt 安装指定的firefox版本

参考资料:https://docs.saltstack.com/en/latest/topics/windows/windows-package-manager.html#install-a-package
说明:当前minion是32位windows,minion所属group为test_server

1, 更新资源库

salt-run winrepo.update_git_repos

2, vim /srv/salt/win/repo/salt-winrepo.git/firefox_x86.sls

firefox_x86:
  '33.1.1':
    full_name: 'Mozilla Firefox 33.1.1 (x86 zh-CN)'
    installer: 'http://xxxxx/server/Firefox_Setup_33.1.1.exe'
    install_flags: '/s'
    uninstaller: '%ProgramFiles%\Mozilla Firefox\uninstall\helper.exe'
    uninstall_flags: '/S'
    msiexec: False
    locale: zh_CN
    reboot: False

3, 生成msgpack序列化

salt-run winrepo.genrepo

4, 查看自定义版本:

salt -N  test_server  pkg.available_version firefox_x86

5,安装:

'salt  -N test_server pkg.install 'firefox_x86' version=33.1.1
unicomrecharge_server1.ctu.com:
    ----------
    Mozilla Firefox 33.1.1 (x86 zh-CN):
        ----------
        new:
            33.1.1
        old:
    Mozilla Maintenance Service:
        ----------
        new:
            33.1.1
        old:
unicomrecharge_server2.ctu.com:
    ----------
    Mozilla Firefox 33.1.1 (x86 zh-CN):
        ----------
        new:
            33.1.1
        old:
    Mozilla Maintenance Service:
        ----------
        new:
            33.1.1
        old:

如果已经安装了
# salt -N test_server pkg.install ‘firefox_x86’ version=33.1.1
unicomrecharge_server1.ctu.com:
———-
unicomrecharge_server2.ctu.com:
———-

6,卸载:

salt -N test_server pkg.remove firefox_x86
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值