我的计划是编写 Ansible Playbook 来安装 nginx-1.8.1。但是我无法使用下面的 playbook 安装特定版本的 Nginx。出现错误“无法安装某些指定的软件包”[我的目标操作系统是 RHEL 8]
您能否帮助我解决此问题?如果您需要任何其他信息,请告知我。提前致谢。
- hosts: localhost
become: yes
tasks:
- name: To install Nginx
yum:
name: nginx-1.8.1
state: present
- name: To enable and start Nginx
service:
name: nginx-1.8.1
state: started
enabled: yes
输出:
TASK [To install Nginx] *******************************************************************************************************************************************************************************************************************************************************
fatal: [localhost]: FAILED! => {"changed": false, "failures": ["nginx-1.8.1 All matches were filtered out by modular filtering for argument: nginx-1.8.1"], "msg": "Failed to install some of the specified packages", "rc": 1, "results": []}