saltstack多版本php的sls文件

栏目: PHP · 发布时间: 7年前

内容简介:saltstack多版本php的sls文件
由于5.3版本,跟5.6,5.5,7.0,7.1用不一样的源,7.1的 php 模块与其他不同,所以需要一些条件判断:
[[email protected]
_master php]# cat php_installed.sls php_repo: cmd.run: - names: - rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm - yum clean all - unless: ls /etc/yum.repos.d/|grep saltstack|grep -v grep php_installed: pkg.installed: {% if pillar['php_version'] != 53 and pillar['php_version'] != 71 %} - names: - php{{pillar['php_version']}}w - php{{pillar['php_version']}}w-common - php{{pillar['php_version']}}w-devel - php{{pillar['php_version']}}w-gd - php{{pillar['php_version']}}w-mysql - php{{pillar['php_version']}}w-pdo - php{{pillar['php_version']}}w-cli - php{{pillar['php_version']}}w-ldap - php{{pillar['php_version']}}w-fpm - php{{pillar['php_version']}}w-opcache - require: - cmd: php_repo {% elif pillar['php_version'] == 71 %} - names: - mod_php{{pillar['php_version']}}w - php{{pillar['php_version']}}w-common - php{{pillar['php_version']}}w-devel - php{{pillar['php_version']}}w-gd - php{{pillar['php_version']}}w-mysql - php{{pillar['php_version']}}w-pdo - php{{pillar['php_version']}}w-cli - php{{pillar['php_version']}}w-ldap - php{{pillar['php_version']}}w-fpm - php{{pillar['php_version']}}w-opcache - require: - cmd: php_repo {% elif pillar['php_version'] == 53 %} - names: - php - php-xcache - php-fpm - php-common - php-mysql - php-pdo {% endif %} pip_ini: file.managed: - name: {{pillar['php_conf_dir']}}/php.ini - source: salt://lnmp_yum/php/files/php.ini_{{pillar['php_version']}} - user: root - group: root - mode: 644 - require: {% if pillar['php_version'] != 53 %} - pkg: php{{pillar['php_version']}}w-fpm {% elif pillar['php_version'] == 53 %} - pkg: php-fpm {% endif %} php_www_conf: file.managed: - name: {{pillar['php_conf_dir']}}/php-fpm.d/www.conf - source: salt://lnmp_yum/php/files/www.conf_{{pillar['php_version']}} - user: root - group: root - mode: 644 - require: {% if pillar['php_version'] != 53 %} - pkg: php{{pillar['php_version']}}w-fpm {% elif pillar['php_version'] == 53 %} - pkg: php-fpm {% endif %} php_service: service.running: - name: php-fpm - enable: True - require: {% if pillar['php_version'] != 53 %} - pkg: php{{pillar['php_version']}}w-fpm {% elif pillar['php_version'] == 53 %} - pkg: php-fpm {% endif %} php_info: file.managed: - name: {{pillar['root_dir']}}/phpinfo.php - source: salt://lnmp_yum/php/files/phpinfo.php - user: root - group: root - mode: 644 - onlyif: test -d {{pillar['root_dir']}} - require: {% if pillar['php_version'] != 53 %} - pkg: php{{pillar['php_version']}}w-fpm {% elif pillar['php_version'] == 53 %} - pkg: php-fpm {% endif %}

以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

C++Templates中文版

C++Templates中文版

David Vandevoorde、Nicolai M.Josuttis / 陈伟柱 / 人民邮电出版社 / 2008-2 / 69.00元

本书是C++模板编程的完全指南,旨在通过基本概念、常用技巧和应用实例3方面的有用资料,为读者打下C++模板知识的坚实基础。 全书共22章。第1章全面介绍了本书的内容结构和相关情况。第1部分(第2~7章)以教程的风格介绍了模板的基本概念,第2部分(第8~13章)阐述了模板的语言细节,第3部分(第14~18章)介绍了C++模板所支持的基本设计技术,第4部分(第19~22章)深入探讨了各种使用模板......一起来看看 《C++Templates中文版》 这本书的介绍吧!

Base64 编码/解码
Base64 编码/解码

Base64 编码/解码

html转js在线工具
html转js在线工具

html转js在线工具