diff options
author | Sacha Chua <sacha@sachachua.com> | 2022-10-14 21:35:40 -0400 |
---|---|---|
committer | Sacha Chua <sacha@sachachua.com> | 2022-10-14 21:35:40 -0400 |
commit | 5266ca74db9f1e1442d957bbd4be17335266b261 (patch) | |
tree | 9c6f8d6a9a1ba775fa58ba275037f6219e03bb3c /wiki/tasks/main.yml | |
parent | 2d391af591700ae52b4f2630454eb31dcbbdd3ad (diff) | |
download | emacsconf-ansible-5266ca74db9f1e1442d957bbd4be17335266b261.tar.xz emacsconf-ansible-5266ca74db9f1e1442d957bbd4be17335266b261.zip |
Make docker wiki work
Diffstat (limited to '')
-rw-r--r-- | wiki/tasks/main.yml | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/wiki/tasks/main.yml b/wiki/tasks/main.yml new file mode 100644 index 0000000..0fa2336 --- /dev/null +++ b/wiki/tasks/main.yml @@ -0,0 +1,57 @@ +--- +- name: Set up packages + ansible.builtin.apt: + update_cache: true + pkg: + - ikiwiki + - git + - openssh-server + - libimage-magick-perl + - libtext-csv-perl + - libxml-writer-perl + - imagemagick + - nginx + - wget + state: present +- name: Create ikiwiki group + group: + name: ikiwiki + state: present +- name: Create ikiwiki user + user: + 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: Copy Ikiwiki plugins + template: + src: "{{ item }}" + dest: "{{ ikiwiki_plugin_path }}" + loop: + - copyright.pm + - htmlscrubber.pm + - license.pm +- include: docker.yml + when: docker is true +- name: Chown all the files to ikiwiki + file: + dest: "{{ ikiwiki_path }}" + owner: ikiwiki + group: ikiwiki + recurse: true +- name: Regenerate all the files + shell: ikiwiki --setup "{{ ikiwiki_path }}/emacsconf.setup" --rebuild --wrappers + register: output +- debug: + var: output |