dokuwiki: remove hardcoded names
This commit is contained in:
parent
cd8f20852e
commit
f863d87fbf
|
@ -5,17 +5,17 @@
|
||||||
package:
|
package:
|
||||||
name: php-openssl,php-session,php-xml
|
name: php-openssl,php-session,php-xml
|
||||||
|
|
||||||
- name: Get current dokuwiki version if any
|
- name: Check if dokuwiki should be upgraded
|
||||||
lineinfile:
|
lineinfile:
|
||||||
path: /srv/http/doku.fri.uni-lj.si/VERSION
|
path: /srv/http/dokuwiki/VERSION
|
||||||
search_string: '{{ dokuwiki_version }}'
|
search_string: '{{ dokuwiki_version }}'
|
||||||
state: absent
|
state: absent
|
||||||
check_mode: true
|
check_mode: true
|
||||||
changed_when: false
|
changed_when: false
|
||||||
register: current_version
|
register: is_current
|
||||||
|
|
||||||
- name: Install or upgrade dokuwiki
|
- name: Install or upgrade dokuwiki
|
||||||
when: 'current_version.found|default(0) == 0'
|
when: 'is_current.found|default(0) == 0'
|
||||||
block:
|
block:
|
||||||
- name: Download dokuwiki tarball
|
- name: Download dokuwiki tarball
|
||||||
get_url:
|
get_url:
|
||||||
|
@ -29,7 +29,7 @@
|
||||||
|
|
||||||
- name: Copy dokuwiki files
|
- name: Copy dokuwiki files
|
||||||
copy:
|
copy:
|
||||||
dest: /srv/http/doku.fri.uni-lj.si/
|
dest: /srv/http/dokuwiki/
|
||||||
src: '/var/tmp/dokuwiki-{{ dokuwiki_version }}/'
|
src: '/var/tmp/dokuwiki-{{ dokuwiki_version }}/'
|
||||||
remote_src: true
|
remote_src: true
|
||||||
owner: nginx
|
owner: nginx
|
||||||
|
|
|
@ -1,14 +1,15 @@
|
||||||
|
{% for fqdn in fqdns %}
|
||||||
server {
|
server {
|
||||||
listen 443 ssl http2;
|
listen 443 ssl http2;
|
||||||
listen [::]:443 ssl http2;
|
listen [::]:443 ssl http2;
|
||||||
server_name doku.fri.uni-lj.si;
|
server_name {{ fqdn }};
|
||||||
|
|
||||||
ssl_certificate /etc/letsencrypt/live/doku.fri.uni-lj.si/fullchain.pem;
|
ssl_certificate /etc/letsencrypt/live/{{ fqdn }}/fullchain.pem;
|
||||||
ssl_certificate_key /etc/letsencrypt/live/doku.fri.uni-lj.si/privkey.pem;
|
ssl_certificate_key /etc/letsencrypt/live/{{ fqdn }}/privkey.pem;
|
||||||
|
|
||||||
client_max_body_size 100M;
|
client_max_body_size 100M;
|
||||||
|
|
||||||
root /srv/http/doku.fri.uni-lj.si;
|
root /srv/http/dokuwiki;
|
||||||
index index.php;
|
index index.php;
|
||||||
|
|
||||||
location ~ /(conf/|bin/|inc/|vendor/|install.php) { deny all; }
|
location ~ /(conf/|bin/|inc/|vendor/|install.php) { deny all; }
|
||||||
|
@ -34,3 +35,5 @@ server {
|
||||||
fastcgi_pass unix:/run/php-fpm.socket;
|
fastcgi_pass unix:/run/php-fpm.socket;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{% endfor %}
|
||||||
|
|
Loading…
Reference in a new issue