dokuwiki: add ability to checkout custom theme repo #21
2 changed files with 17 additions and 0 deletions
|
@ -3,3 +3,5 @@ dokuwiki__installpath: "/var/www/dokuwiki"
|
|||
dokuwiki__php_version: "{{ dokuwiki__php_versions[ansible_distribution + '-' + ansible_distribution_major_version] }}"
|
||||
dokuwiki__php_user: "www-data"
|
||||
dokuwiki__nginx_user: "nginx"
|
||||
dokuwiki__custom_theme_git_url: ""
|
||||
dokuwiki__custom_theme_name: ""
|
||||
|
|
|
@ -42,3 +42,18 @@
|
|||
owner: root
|
||||
group: root
|
||||
mode: "0644"
|
||||
|
||||
- name: checkout custom theme git repo
|
||||
become: true
|
||||
ansible.builtin.git:
|
||||
june marked this conversation as resolved
|
||||
repo: "{{ dokuwiki__custom_theme_git_url }}"
|
||||
dest: "{{ dokuwiki__installpath }}/lib/tpl/{{ dokuwiki__custom_theme_name }}"
|
||||
force: true
|
||||
depth: 1
|
||||
single_branch: true
|
||||
track_submodules: true
|
||||
accept_hostkey: true
|
||||
accept_newhostkey: true
|
||||
june marked this conversation as resolved
june
commented
Let's not do that, but encourage just using Let's not do that, but encourage just using `https://`-clone URLs instead?
dario
commented
yeah the hostkey stuff makes sense. yeah the hostkey stuff makes sense.
but single branch makes sense as a shallow copy of the repo is sufficient to apply the theme, and if a theme uses submodules, these need to be pulled in as well
june
commented
Oh yeah ofc, I'm just talking about:
Forgejo doesn't allow highlighting specific ranges, so it just picked four lines it seems. :/ Oh yeah ofc, I'm just talking about:
```
accept_hostkey: true
accept_newhostkey: true
```
Forgejo doesn't allow highlighting specific ranges, so it just picked four lines it seems. :/
|
||||
when:
|
||||
- dokuwiki__custom_theme_git_url != ""
|
||||
- dokuwiki__custom_theme_name != ""
|
||||
|
|
Loading…
Add table
Reference in a new issue
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:And then set for
ansible.builtin.git
:Documentation for
dokuwiki__custom_theme_version
would be: version (git branch, tag, ...) to checkout, defaultmain