0
启用回购为了安装PHP7 7个I需要使用下面的命令启用雷米 - php71回购:Ansible 2.3.1.0:在CentOS 7
yum-config-manager --enable remi-php71
我怎么能做到这一点在ansible任务吗?
启用回购为了安装PHP7 7个I需要使用下面的命令启用雷米 - php71回购:Ansible 2.3.1.0:在CentOS 7
yum-config-manager --enable remi-php71
我怎么能做到这一点在ansible任务吗?
你可以做到这一点发出特定的shell命令:
- name: enable remi-php71
shell: yum-config-manager --enable remi-php71
虽然它可能是更好的通过类似声明yum软件库本身:
- name: Add remi-php71
yum_repository:
name: remi-php71
description: Remi's PHP 7.1 RPM repository for Enterprise Linux $releasever - $basearch
mirrorlist: http://rpms.remirepo.net/enterprise/$releasever/php71/mirror
enabled: yes
gpgcheck: 1
gpgkey: http://rpms.remirepo.net/RPM-GPG-KEY-remi
注意,虽然“yum-config-manager”可能有一些问题(带有返回码),但您还需要声明“remi-safe”存储库,它为所有PHP版本提供通用依赖关系。 –