mirror of
https://github.com/geerlingguy/ansible-role-nginx.git
synced 2025-02-19 01:41:32 +01:00
Initial commit.
This commit is contained in:
commit
d9aebe7dee
31
README.md
Normal file
31
README.md
Normal file
@ -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/.
|
5
files/nginx.repo
Normal file
5
files/nginx.repo
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
[nginx]
|
||||||
|
name=nginx repo
|
||||||
|
baseurl=http://nginx.org/packages/centos/6/$basearch/
|
||||||
|
gpgcheck=0
|
||||||
|
enabled=1
|
3
handlers/main.yml
Normal file
3
handlers/main.yml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
---
|
||||||
|
- name: restart nginx
|
||||||
|
command: service nginx restart
|
16
meta/main.yml
Normal file
16
meta/main.yml
Normal file
@ -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
|
9
tasks/main.yml
Normal file
9
tasks/main.yml
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user