mirror of
https://github.com/geerlingguy/ansible-role-nginx.git
synced 2024-10-01 04:37:26 +02:00
Merge pull request #54 from bartekrutkowski/master
Add FreeBSD support.
This commit is contained in:
commit
7163dbfc12
@ -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
|
||||
|
13
tasks/setup-FreeBSD.yml
Normal file
13
tasks/setup-FreeBSD.yml
Normal file
@ -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
|
||||
|
9
vars/FreeBSD.yml
Normal file
9
vars/FreeBSD.yml
Normal file
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user