Merge pull request #54 from bartekrutkowski/master

Add FreeBSD support.
pull/56/head
Jeff Geerling 8 years ago
commit 7163dbfc12
  1. 9
      meta/main.yml
  2. 7
      tasks/main.yml
  3. 13
      tasks/setup-FreeBSD.yml
  4. 2
      templates/nginx.conf.j2
  5. 3
      vars/Debian.yml
  6. 9
      vars/FreeBSD.yml
  7. 3
      vars/RedHat.yml

@ -3,7 +3,7 @@ dependencies: []
galaxy_info:
author: geerlingguy
description: Nginx installation for Linux/UNIX.
description: Nginx installation for Linux and FreeBSD.
company: "Midwestern Mac, LLC"
license: "license (BSD, MIT)"
min_ansible_version: 1.8
@ -18,6 +18,13 @@ galaxy_info:
- name: Ubuntu
versions:
- all
- name: FreeBSD
versions:
- 10.3
- 10.2
- 10.1
- 10.0
- 9.3
galaxy_tags:
- development
- web

@ -18,6 +18,9 @@
- include: setup-Debian.yml
when: ansible_os_family == 'Debian'
- include: setup-FreeBSD.yml
when: ansible_os_family == 'FreeBSD'
# Vhost configuration.
- include: vhosts.yml
@ -25,9 +28,9 @@
- name: Copy nginx configuration in place.
template:
src: nginx.conf.j2
dest: /etc/nginx/nginx.conf
dest: "{{ nginx_conf_file_path }}"
owner: root
group: root
group: "{{ root_group }}"
mode: 0644
notify:
- reload nginx

@ -0,0 +1,13 @@
---
- name: Update pkg cache.
shell: pkg update -f
- name: Ensure nginx is installed.
pkgng:
name: "{{ nginx_package_name }}"
state: present
- name: Create logs directory.
file:
path: /var/log/nginx
state: directory

@ -15,7 +15,7 @@ events {
{% endif %}
http {
include /etc/nginx/mime.types;
include {{ nginx_mime_file_path }};
default_type application/octet-stream;
server_names_hash_bucket_size 64;

@ -1,5 +1,8 @@
---
root_group: root
nginx_conf_path: /etc/nginx/conf.d
nginx_conf_file_path: /etc/nginx/nginx.conf
nginx_mime_file_path: /etc/nginx/mime.types
nginx_pidfile: /run/nginx.pid
nginx_vhost_path: /etc/nginx/sites-enabled
nginx_default_vhost_path: /etc/nginx/sites-enabled/default

@ -0,0 +1,9 @@
---
root_group: wheel
nginx_conf_path: /usr/local/etc/nginx/conf.d
nginx_conf_file_path: /usr/local/etc/nginx/nginx.conf
nginx_mime_file_path: /usr/local/etc/nginx/mime.types
nginx_pidfile: /var/run/nginx.pid
nginx_vhost_path: /usr/local/etc/nginx/sites-enabled
nginx_default_vhost_path: /usr/local/etc/nginx/sites-enabled/default
__nginx_user: "www"

@ -1,5 +1,8 @@
---
root_group: root
nginx_conf_path: /etc/nginx/conf.d
nginx_conf_file_path: /etc/nginx/nginx.conf
nginx_mime_file_path: /etc/nginx/mime.types
nginx_pidfile: /var/run/nginx.pid
nginx_vhost_path: /etc/nginx/conf.d
nginx_default_vhost_path: /etc/nginx/conf.d/default.conf