内容简介: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 %}
以上所述就是小编给大家介绍的《saltstack多版本php的sls文件》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!
猜你喜欢:- vue配置文件实现代理v2版本
- saltstack多版本php的sls文件
- kkFileView 文件预览 v3.3.1 岁末版本发布
- 企业文件共享网盘 dboxShare 发布 v4.0 版本
- 使用 7-Zip 的命令行版本来压缩和解压文件
- 基金数据文件阅读器 FundFileReader 发布 V1.5.0 版本
本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
Making Things See
Greg Borenstein / Make / 2012-2-3 / USD 39.99
Welcome to the Vision Revolution. With Microsoft's Kinect leading the way, you can now use 3D computer vision technology to build digital 3D models of people and objects that you can manipulate with g......一起来看看 《Making Things See》 这本书的介绍吧!