dokuwiki: add ability to checkout custom theme repo #21

Closed
dario wants to merge 6 commits from eh22-wiki-design into main
3 changed files with 3 additions and 0 deletions
Showing only changes of commit b5ddebcada - Show all commits
roles/dokuwiki

View file

@ -23,6 +23,7 @@ None.
- `dokuwiki__php_user`: User of your php-fpm process, default `www-data`
- `dokuwiki__nginx_user`: User of your nginx process, default `nginx`
- `dokuwiki__custom_theme_git_url`: Clone URL of custom theme (HTTPS only)
- `dokuwiki__custom_theme_version`: Version (git branch, tag, ...) to checkout, default main
- `dokuwiki__custom_theme_name`: Name of the directory into which the custom theme is cloned
## nginx Configuration

View file

@ -4,4 +4,5 @@ dokuwiki__php_version: "{{ dokuwiki__php_versions[ansible_distribution + '-' + a
dokuwiki__php_user: "www-data"
dokuwiki__nginx_user: "nginx"
dokuwiki__custom_theme_git_url: ""
dokuwiki__custom_theme_version: "main"
dokuwiki__custom_theme_name: ""

View file

@ -48,6 +48,7 @@
ansible.builtin.git:
june marked this conversation as resolved
Review

ansible-lint is failing as this module-use isn't idempotent. Let's introduce the following option and attribute for the module, to make it theoretically possible to be idempotent:

dokuwiki__custom_theme_version: "main"

And then set for ansible.builtin.git:

    version: "{{ dokuwiki__custom_theme_version }}"

Documentation for dokuwiki__custom_theme_version would be: version (git branch, tag, ...) to checkout, default main

`ansible-lint` is failing as this module-use isn't idempotent. Let's introduce the following option and attribute for the module, to make it theoretically possible to be idempotent: ```yaml dokuwiki__custom_theme_version: "main" ``` And then set for `ansible.builtin.git`: ```yaml version: "{{ dokuwiki__custom_theme_version }}" ``` Documentation for `dokuwiki__custom_theme_version` would be: version (git branch, tag, ...) to checkout, default `main`
repo: "{{ dokuwiki__custom_theme_git_url }}"
dest: "{{ dokuwiki__installpath }}/lib/tpl/{{ dokuwiki__custom_theme_name }}"
version: "{{ dokuwiki__custom_theme_version }}"
force: true
depth: 1
single_branch: true