博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
php幂等性,通过Ansible安装PHP Pear包,具有幂等性
阅读量:7085 次
发布时间:2019-06-28

本文共 1633 字,大约阅读时间需要 5 分钟。

我正在使用Ansible安装

PHP的Pear包,如下所示:

- name: Add Phergie PEAR channel.

command: pear channel-discover pear.phergie.org

ignore_errors: yes

- name: Install Phergie and related plugins.

command: pear install pear.phergie.org/{

{ item }}

with_items:

- Phergie

- Phergie_Plugin_AltNick

ignore_errors: yes

ignore_errors是必需的,因为pear在运行之前已成功运行/完成的命令时总是报告错误(例如:

TASK: [Add Phergie PEAR channel.] *********************************************

failed: [10.31.9.210] => {"changed": true, "cmd": ["pear", "channel-discover", "pear.phergie.org"], "delta": "0:00:01.089340", "end": "2013-12-27 10:16:25.640083", "item": "", "rc": 1, "start": "2013-12-27 10:16:24.550743"}

stdout: Channel "pear.phergie.org" is already initialized

...ignoring

TASK: [Install Phergie and related plugins.] **********************************

failed: [10.31.9.210] => (item=Phergie) => {"changed": true, "cmd": ["pear", "install", "pear.phergie.org/Phergie"], "delta": "0:00:03.698780", "end": "2013-12-27 10:16:30.337371", "item": "Phergie", "rc": 1, "start": "2013-12-27 10:16:26.638591"}

stdout: phergie/Phergie is already installed and is the same as the released version 2.1.0

install failed

...ignoring

failed: [10.31.9.210] => (item=Phergie_Plugin_AltNick) => {"changed": true, "cmd": ["pear", "install", "pear.phergie.org/Phergie_Plugin_AltNick"], "delta": "0:00:01.779589", "end": "2013-12-27 10:16:33.231524", "item": "Phergie_Plugin_AltNick", "rc": 1, "start": "2013-12-27 10:16:31.451935"}

stdout: phergie/Phergie_Plugin_AltNick is already installed and is the same as the released version 2.1.0

install failed

...ignoring

是否有更好(更幂等)的方式来运行pear命令,而不必滚动一堆大的,红色忽略的错误?

转载地址:http://parml.baihongyu.com/

你可能感兴趣的文章
Centos7搭建OpenNebula云平台
查看>>
Shell流程控制之if语句
查看>>
快过高铁!构建云分布式应用还能这样操作?!
查看>>
ftp服务器的搭建于三种访问途径
查看>>
字节流与字符流的区别及相互转换
查看>>
教你将PDF文件旋转的方法
查看>>
初识 Knative: 跨平台的 Serverless 编排框架
查看>>
字符串匹配
查看>>
yum安装varnish
查看>>
计算机基础超简
查看>>
私有云为什么更得企业青睐?
查看>>
python如何学习(二)
查看>>
移动智能终端能快速及时查询商品
查看>>
快速导入多张CAD图纸文件转换成常见的彩色高清JPG格式如何进行?
查看>>
HTTPS与HTTP协议常见问题,http和是https分别是什么
查看>>
学习Linux笔记20170913
查看>>
IL指令汇总
查看>>
jQuery特性操作
查看>>
关闭某个登录用户
查看>>
配置Oracle安全审计选项audit
查看>>