今天,我用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
供其参考!
本文转自hahazhu0634 51CTO博客,原文链接:http://blog.51cto.com/5ydycm/1616528,如需转载请自行联系原作者