diff options
author | Sacha Chua <sacha@sachachua.com> | 2022-10-17 17:44:06 -0400 |
---|---|---|
committer | Sacha Chua <sacha@sachachua.com> | 2022-10-17 17:44:06 -0400 |
commit | 7671b51616a25fa6cff9c26fe65d5f703ff94e21 (patch) | |
tree | b85c0e39c1ca65cbf2d9fb4d0e534acd6861083b /roles/wiki/tasks/main.yml | |
parent | 656e440054f43fc09050ba13e29d4eaaf355fcf5 (diff) | |
download | emacsconf-ansible-7671b51616a25fa6cff9c26fe65d5f703ff94e21.tar.xz emacsconf-ansible-7671b51616a25fa6cff9c26fe65d5f703ff94e21.zip |
Get wiki role to push updates to the right place in docker
Ikiwiki has this three-repo setup with post-update hooks
Diffstat (limited to 'roles/wiki/tasks/main.yml')
-rw-r--r-- | roles/wiki/tasks/main.yml | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/roles/wiki/tasks/main.yml b/roles/wiki/tasks/main.yml index 35c297d..cd7cbdc 100644 --- a/roles/wiki/tasks/main.yml +++ b/roles/wiki/tasks/main.yml @@ -22,29 +22,26 @@ name: ikiwiki group: ikiwiki state: present -- debug: - var: docker -- name: Set up or update repositories - ansible.builtin.git: - repo: git://git.emacsconf.org/emacsconf-wiki - dest: "{{ ikiwiki_src_dir }}" - when: not docker|d(false) - name: Template the config ansible.builtin.template: src: emacsconf.setup dest: "{{ ikiwiki_path }}/emacsconf.setup" owner: ikiwiki +- name: Create the plugin directory + file: + path: "{{ ikiwiki_plugin_path }}/IkiWiki/Plugin" + state: directory - name: Copy Ikiwiki plugins tags: wiki-plugins template: src: "{{ item }}" - dest: "{{ ikiwiki_plugin_path }}/{{ item }}" + dest: "{{ ikiwiki_plugin_path }}/IkiWiki/Plugin/{{ item }}" loop: - copyright.pm - htmlscrubber.pm - license.pm - include: docker.yml - when: docker is true + when: docker - name: Chown all the files to ikiwiki tags: wiki-plugins file: @@ -54,7 +51,9 @@ recurse: true - name: Regenerate all the files tags: wiki-regenerate, wiki-plugins - shell: ikiwiki --setup "{{ ikiwiki_path }}/emacsconf.setup" --rebuild --wrappers + become: true + become_user: ikiwiki + shell: cd ~ikiwiki; ikiwiki --setup "{{ ikiwiki_path }}/emacsconf.setup" --rebuild --wrappers register: output - debug: var: output |