Reputation: 23
I want to install and run nginx server using ansible on ec2 instance(centOS). But I have following problem
Output of problem
fatal: [ec2-user]: FAILED! => {"changed": false, "msg": "No package matching 'nginx' found available, installed or updated", "rc": 126, "results": ["No package matching 'nginx' found available, installed or updated"]}
my playbook:
---
- hosts: all
tasks:
- name: install updates
yum: name=* state=latest
- name: install nginx
become: yes
yum: name=nginx state=latest
- name: starting nginx
become: yes
service: name=nginx state=started
Upvotes: 1
Views: 3091