diff --git a/README.md b/README.md index 5a5f668..e351682 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/defaults/main.yml b/defaults/main.yml index b21140b..38aa3da 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -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" diff --git a/meta/main.yml b/meta/main.yml index a7f79fc..9418877 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -18,6 +18,9 @@ galaxy_info: - name: Ubuntu versions: - all + - name: Archlinux + versions: + - all - name: FreeBSD versions: - 10.3 diff --git a/tasks/main.yml b/tasks/main.yml index 74ca563..4ee901a 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -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 diff --git a/tasks/setup-Archlinux.yml b/tasks/setup-Archlinux.yml new file mode 100644 index 0000000..2aa89ec --- /dev/null +++ b/tasks/setup-Archlinux.yml @@ -0,0 +1,5 @@ +--- +- name: Ensure nginx is installed. + pacman: + name: "{{ nginx_package_name }}" + state: installed diff --git a/vars/Archlinux.yml b/vars/Archlinux.yml new file mode 100644 index 0000000..593e100 --- /dev/null +++ b/vars/Archlinux.yml @@ -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"