Add options for setting the webroot owner/group

This commit is contained in:
s3lph 2022-03-01 00:28:44 +01:00
parent 06e6a3493a
commit b95043b4df
5 changed files with 9 additions and 5 deletions

View file

@ -3,6 +3,8 @@
apache2_vhost_serveradmin: webmaster@localhost
apache2_vhost_serveraliases: []
apache2_vhost_documentroot: /var/www/html
apache2_vhost_documentroot_owner: www-data
apache2_vhost_documentroot_group: www-data
apache2_vhost_loglevel: warn
apache2_vhost_errorlog: "${APACHE_LOG_DIR}/error.log"
apache2_vhost_accesslog: "${APACHE_LOG_DIR}/access.log combined"

View file

@ -27,8 +27,8 @@
ansible.builtin.file:
path: "{{ item.documentroot | default(apache2_vhost_documentroot) }}"
state: directory
owner: www-data
group: www-data
owner: {{ item.documentroot_owner | default(apache2_vhost_documentroot_owner) }}
group: {{ item.documentroot_group | default(apache2_vhost_documentroot_group) }}
mode: 0755
loop: "{{ apache2_sites.values() }}"

View file

@ -2,6 +2,8 @@
nginx_vhost_serveraliases: []
nginx_vhost_documentroot: /var/www/html
nginx_vhost_documentroot_owner: www-data
nginx_vhost_documentroot_group: www-data
nginx_vhost_http_enabled: true
nginx_vhost_https_enabled: true

View file

@ -31,8 +31,8 @@
ansible.builtin.file:
path: "{{ item.documentroot | default(nginx_vhost_documentroot) }}"
state: directory
owner: www-data
group: www-data
owner: {{ item.documentroot_owner | default(nginx_vhost_documentroot_owner) }}
group: {{ item.documentroot_group | default(nginx_vhost_documentroot_group) }}
mode: 0755
loop: "{{ nginx_sites.values() }}"

View file

@ -12,7 +12,7 @@
dest: /etc/nginx/dh_param
owner: root
group: root
moe: 0644
mode: 0644
notify: reload nginx
- name: start and enable nginx