标签:saltstack
webtatic:主要供应最新LAMP等软件源(官网:https://www.webtatic.com/)
今天,我用saltstack来安装其软件,也就是扩展一个yum仓库.以方便安装/更新lamp相关软件.
不废话,直接贴配置yum/init.sls:
clean_yum_cache:
cmd.wait:
- name: yum clean all
webatic_rpm:
file.managed:
- name: /soft/latest.rpm
- source: salt://yum/files/latest.rpm
- mode: 644
- unless: test -e /soft/latest.rpm
webatic_yum:
cmd.run:
- cwd: /soft/
- names:
- rpm -ivh latest.rpm
- unless: rpm -q webtatic-release
- require:
- file: webatic_rpm
- watch_in:
- cmd: clean_yum_cache
供其参考!
本文出自 “坏男孩” 博客,请务必保留此出处http://5ydycm.blog.51cto.com/115934/1616528
标签:saltstack
原文地址:http://5ydycm.blog.51cto.com/115934/1616528