Skip to content
This repository has been archived by the owner on Aug 13, 2024. It is now read-only.

make it possible to set up the nginx user's secondary groups #60

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
make it possible to set up the nginx user's secondary groups
  • Loading branch information
Brian Picciano committed Aug 7, 2015
commit 7761784460ef2014c38af90b990ea9395f704644
3 changes: 3 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ nginx_conf_dir: "/etc/nginx"
nginx_user: "{% if ansible_os_family == 'RedHat' %}nginx{% elif ansible_os_family == 'Debian' %}www-data{% endif %}"
nginx_group: "{{nginx_user}}"

# Any additional groups the nginx user should be added to
nginx_groups: ""

nginx_pid_file: '/var/run/{{nginx_service_name}}.pid'

nginx_worker_processes: "{{ ansible_processor_vcpus }}"
Expand Down
7 changes: 7 additions & 0 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
when: nginx_official_repo == True
- include: installation.packages.yml
when: nginx_installation_type == "packages"

- name: Setup nginx user's groups
user:
name: "{{nginx_user}}"
group: "{{nginx_group}}"
groups: "{{nginx_groups}}"

- include: remove-defaults.yml
when: not keep_only_specified
- include: remove-extras.yml
Expand Down