Initial commit.

pull/1/head
Jeff Geerling 10 years ago
commit d9aebe7dee
  1. 31
      README.md
  2. 5
      files/nginx.repo
  3. 3
      handlers/main.yml
  4. 16
      meta/main.yml
  5. 9
      tasks/main.yml

@ -0,0 +1,31 @@
# Ansible Role: Nginx
Installs Nginx on RHEL/CentOS 6.x.
This role installs the latest version of Nginx direct from the Nginx yum repository.
## Requirements
None.
## Role Variables
None.
## Dependencies
None.
## Example Playbook
- hosts: server
roles:
- { role: geerlingguy.nginx }
## License
MIT / BSD
## Author Information
This role was created in 2014 by Jeff Geerling (@geerlingguy), author of Ansible for DevOps. You can find out more about the book at http://ansiblefordevops.com/, and learn about the author at http://jeffgeerling.com/.

@ -0,0 +1,5 @@
[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/centos/6/$basearch/
gpgcheck=0
enabled=1

@ -0,0 +1,3 @@
---
- name: restart nginx
command: service nginx restart

@ -0,0 +1,16 @@
---
dependencies: []
galaxy_info:
author: geerlingguy
description: Nginx installation for Linux/UNIX.
company: "Midwestern Mac, LLC"
license: "license (BSD, MIT)"
min_ansible_version: 1.4
platforms:
- name: EL
versions:
- 6
categories:
- development
- web

@ -0,0 +1,9 @@
---
- name: Enable nginx repo.
copy: src=nginx.repo dest=/etc/yum.repos.d/nginx.repo owner=root group=root mode=644
- name: Ensure nginx is installed.
yum: pkg=nginx state=installed enablerepo=nginx
- name: Ensure nginx is started and enabled to start at boot.
service: name=nginx state=started enabled=yes