|
|
|
@@ -65,17 +65,60 @@ |
|
|
|
pull: true |
|
|
|
when: "matrix_cactus_comments_container_image_self_build | bool" |
|
|
|
|
|
|
|
- name: Ensure client javascript file is downloaded |
|
|
|
ansible.builtin.get_url: |
|
|
|
url: https://latest.cactus.chat/cactus.js |
|
|
|
dest: "{{ matrix_cactus_comments_client_path }}/cactus.js" |
|
|
|
mode: "{{ matrix_cactus_comments_client_file_permissions }}" |
|
|
|
- block: |
|
|
|
- name: Download client binary to local folder |
|
|
|
ansible.builtin.get_url: |
|
|
|
url: "https://gitlab.com/cactus-comments/cactus-client/-/archive/v{{ matrix_cactus_comments_client_version }}/cactus-client-v{{ matrix_cactus_comments_client_version }}.tar.gz" |
|
|
|
dest: "/tmp/cactus-comments-{{ matrix_cactus_comments_client_version }}.tar.gz" |
|
|
|
mode: '0644' |
|
|
|
register: _download_client |
|
|
|
until: _download_client is succeeded |
|
|
|
retries: 5 |
|
|
|
delay: 2 |
|
|
|
check_mode: false |
|
|
|
|
|
|
|
- name: Ensure client css file is downloaded |
|
|
|
ansible.builtin.get_url: |
|
|
|
url: https://latest.cactus.chat/style.css |
|
|
|
dest: "{{ matrix_cactus_comments_client_path }}/style.css" |
|
|
|
mode: "{{ matrix_cactus_comments_client_file_permissions }}" |
|
|
|
- name: Unpack client |
|
|
|
ansible.builtin.unarchive: |
|
|
|
src: "/tmp/cactus-comments-{{ matrix_cactus_comments_client_version }}.tar.gz" |
|
|
|
dest: "/tmp/" |
|
|
|
remote_src: yes |
|
|
|
mode: 600 |
|
|
|
check_mode: false |
|
|
|
|
|
|
|
- name: Propagate client javascript file |
|
|
|
ansible.builtin.copy: |
|
|
|
src: "/tmp/cactus-client-v{{ matrix_cactus_comments_client_version }}/src/cactus.js" |
|
|
|
remote_src: true |
|
|
|
dest: "{{ matrix_cactus_comments_client_path }}/cactus.js" |
|
|
|
mode: "{{ matrix_cactus_comments_client_file_permissions }}" |
|
|
|
owner: "{{ matrix_user_username }}" |
|
|
|
group: "{{ matrix_user_groupname }}" |
|
|
|
- name: Propagate client style file |
|
|
|
ansible.builtin.copy: |
|
|
|
src: "/tmp/cactus-client-v{{ matrix_cactus_comments_client_version }}/src/style.css" |
|
|
|
remote_src: true |
|
|
|
dest: "{{ matrix_cactus_comments_client_path }}/style.css" |
|
|
|
mode: "{{ matrix_cactus_comments_client_file_permissions }}" |
|
|
|
owner: "{{ matrix_user_username }}" |
|
|
|
group: "{{ matrix_user_groupname }}" |
|
|
|
when: matrix_cactus_comments_client_local_dir | length == 0 |
|
|
|
|
|
|
|
- block: |
|
|
|
- name: Propagate locally distributed client javascreipt |
|
|
|
copy: |
|
|
|
src: "{{ matrix_cactus_comments_client_local_dir }}/src/cactus.js" |
|
|
|
dest: "{{ matrix_cactus_comments_client_path }}/cactus.js" |
|
|
|
mode: "{{ matrix_cactus_comments_client_file_permissions }}" |
|
|
|
owner: "{{ matrix_user_username }}" |
|
|
|
group: "{{ matrix_user_groupname }}" |
|
|
|
- name: Propagate locally distributed client stlye.css |
|
|
|
copy: |
|
|
|
src: "{{ matrix_cactus_comments_client_local_dir }}/src/style.css" |
|
|
|
dest: "{{ matrix_cactus_comments_client_path }}/style.css" |
|
|
|
mode: "{{ matrix_cactus_comments_client_file_permissions }}" |
|
|
|
owner: "{{ matrix_user_username }}" |
|
|
|
group: "{{ matrix_user_groupname }}" |
|
|
|
when: matrix_cactus_comments_client_local_dir | length > 0 |
|
|
|
|
|
|
|
- name: Ensure matrix-cactus-comments.service installed |
|
|
|
ansible.builtin.template: |
|
|
|
|