Merge pull request #109 from bmcclure/master

Support Archlinux
pull/110/head
Jeff Geerling 7 years ago committed by GitHub
commit 7bdcc4811b
  1. 4
      README.md
  2. 2
      defaults/main.yml
  3. 3
      meta/main.yml
  4. 3
      tasks/main.yml
  5. 5
      tasks/setup-Archlinux.yml
  6. 9
      vars/Archlinux.yml

@ -2,9 +2,9 @@
[![Build Status](https://travis-ci.org/geerlingguy/ansible-role-nginx.svg?branch=master)](https://travis-ci.org/geerlingguy/ansible-role-nginx)
Installs Nginx on RedHat/CentOS or Debian/Ubuntu Linux, FreeBSD or OpenBSD servers.
Installs Nginx on RedHat/CentOS, Debian/Ubuntu, Archlinux, FreeBSD or OpenBSD servers.
This role installs and configures the latest version of Nginx from the Nginx yum repository (on RedHat-based systems) or via apt (on Debian-based systems) or pkgng (on FreeBSD systems) or pkg_add (on OpenBSD systems). You will likely need to do extra setup work after this role has installed Nginx, like adding your own [virtualhost].conf file inside `/etc/nginx/conf.d/`, describing the location and options to use for your particular website.
This role installs and configures the latest version of Nginx from the Nginx yum repository (on RedHat-based systems) or via apt (on Debian-based systems) or pacman (Archlinux) or pkgng (on FreeBSD systems) or pkg_add (on OpenBSD systems). You will likely need to do extra setup work after this role has installed Nginx, like adding your own [virtualhost].conf file inside `/etc/nginx/conf.d/`, describing the location and options to use for your particular website.
## Requirements

@ -9,7 +9,7 @@ nginx_yum_repo_enabled: true
nginx_ppa_use: false
nginx_ppa_version: stable
# The name of the nginx apt/yum package to install.
# The name of the nginx package to install.
nginx_package_name: "nginx"
nginx_conf_template: "nginx.conf.j2"

@ -18,6 +18,9 @@ galaxy_info:
- name: Ubuntu
versions:
- all
- name: Archlinux
versions:
- all
- name: FreeBSD
versions:
- 10.3

@ -24,6 +24,9 @@
- include: setup-OpenBSD.yml
when: ansible_os_family == 'OpenBSD'
- include: setup-Archlinux.yml
when: ansible_os_family == 'Archlinux'
# Vhost configuration.
- include: vhosts.yml

@ -0,0 +1,5 @@
---
- name: Ensure nginx is installed.
pacman:
name: "{{ nginx_package_name }}"
state: installed

@ -0,0 +1,9 @@
---
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
__nginx_user: "http"