Add options for setting the webroot owner/group
This commit is contained in:
parent
06e6a3493a
commit
b95043b4df
5 changed files with 9 additions and 5 deletions
|
@ -3,6 +3,8 @@
|
||||||
apache2_vhost_serveradmin: webmaster@localhost
|
apache2_vhost_serveradmin: webmaster@localhost
|
||||||
apache2_vhost_serveraliases: []
|
apache2_vhost_serveraliases: []
|
||||||
apache2_vhost_documentroot: /var/www/html
|
apache2_vhost_documentroot: /var/www/html
|
||||||
|
apache2_vhost_documentroot_owner: www-data
|
||||||
|
apache2_vhost_documentroot_group: www-data
|
||||||
apache2_vhost_loglevel: warn
|
apache2_vhost_loglevel: warn
|
||||||
apache2_vhost_errorlog: "${APACHE_LOG_DIR}/error.log"
|
apache2_vhost_errorlog: "${APACHE_LOG_DIR}/error.log"
|
||||||
apache2_vhost_accesslog: "${APACHE_LOG_DIR}/access.log combined"
|
apache2_vhost_accesslog: "${APACHE_LOG_DIR}/access.log combined"
|
||||||
|
|
|
@ -27,8 +27,8 @@
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ item.documentroot | default(apache2_vhost_documentroot) }}"
|
path: "{{ item.documentroot | default(apache2_vhost_documentroot) }}"
|
||||||
state: directory
|
state: directory
|
||||||
owner: www-data
|
owner: {{ item.documentroot_owner | default(apache2_vhost_documentroot_owner) }}
|
||||||
group: www-data
|
group: {{ item.documentroot_group | default(apache2_vhost_documentroot_group) }}
|
||||||
mode: 0755
|
mode: 0755
|
||||||
loop: "{{ apache2_sites.values() }}"
|
loop: "{{ apache2_sites.values() }}"
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
nginx_vhost_serveraliases: []
|
nginx_vhost_serveraliases: []
|
||||||
nginx_vhost_documentroot: /var/www/html
|
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_http_enabled: true
|
||||||
nginx_vhost_https_enabled: true
|
nginx_vhost_https_enabled: true
|
||||||
|
|
|
@ -31,8 +31,8 @@
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ item.documentroot | default(nginx_vhost_documentroot) }}"
|
path: "{{ item.documentroot | default(nginx_vhost_documentroot) }}"
|
||||||
state: directory
|
state: directory
|
||||||
owner: www-data
|
owner: {{ item.documentroot_owner | default(nginx_vhost_documentroot_owner) }}
|
||||||
group: www-data
|
group: {{ item.documentroot_group | default(nginx_vhost_documentroot_group) }}
|
||||||
mode: 0755
|
mode: 0755
|
||||||
loop: "{{ nginx_sites.values() }}"
|
loop: "{{ nginx_sites.values() }}"
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
dest: /etc/nginx/dh_param
|
dest: /etc/nginx/dh_param
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
moe: 0644
|
mode: 0644
|
||||||
notify: reload nginx
|
notify: reload nginx
|
||||||
|
|
||||||
- name: start and enable nginx
|
- name: start and enable nginx
|
||||||
|
|
Loading…
Reference in a new issue