diff --git a/meta/main.yml b/meta/main.yml index a7f79fc..210f8b6 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -3,7 +3,7 @@ dependencies: [] galaxy_info: author: geerlingguy - description: Nginx installation for Linux, FreeBSD and OpenBSD. + description: Nginx installation for Linux, FreeBSD, OpenBSD and SmartOS. company: "Midwestern Mac, LLC" license: "license (BSD, MIT)" min_ansible_version: 1.8 @@ -29,6 +29,9 @@ galaxy_info: versions: - 5.9 - 6.0 + - name: SmartOS + versions: + - 16.4.1 galaxy_tags: - development - web diff --git a/tasks/main.yml b/tasks/main.yml index 6c420fe..78e27f1 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -24,6 +24,9 @@ - include: setup-OpenBSD.yml when: ansible_os_family == 'OpenBSD' +- include: setup-SmartOS.yml + when: (ansible_os_family == 'Solaris') and (ansible_distribution == 'SmartOS') + # Vhost configuration. - include: vhosts.yml diff --git a/tasks/setup-SmartOS.yml b/tasks/setup-SmartOS.yml new file mode 100644 index 0000000..0a43b37 --- /dev/null +++ b/tasks/setup-SmartOS.yml @@ -0,0 +1,13 @@ +--- +- name: Update pkgin cache. + shell: pkgin update -f + +- name: Ensure nginx is installed. + pkgin: + name: "{{ nginx_package_name }}" + state: present + +- name: Create logs directory. + file: + path: /var/log/nginx + state: directory diff --git a/vars/Solaris.yml b/vars/Solaris.yml new file mode 100644 index 0000000..0559cf9 --- /dev/null +++ b/vars/Solaris.yml @@ -0,0 +1,10 @@ +--- +root_group: root +nginx_conf_path: /opt/local/etc/nginx/conf.d +nginx_conf_file_path: /opt/local/etc/nginx/nginx.conf +nginx_mime_file_path: /opt/local/etc/nginx/mime.types +nginx_pidfile: /var/db/nginx/nginx.pid +nginx_vhost_path: /opt/local/etc/nginx/sites-enabled +nginx_default_vhost_path: /opt/local/etc/nginx/sites-enabled/default +nginx_package_name: "nginx" +__nginx_user: "www"