Add additional changes for Dimension to work
This commit is contained in:
@ -2,6 +2,12 @@
|
||||
tags:
|
||||
- always
|
||||
|
||||
- import_tasks: "{{ role_path }}/tasks/validate_config.yml"
|
||||
when: run_setup
|
||||
tags:
|
||||
- setup-all
|
||||
- setup-dimension
|
||||
|
||||
- import_tasks: "{{ role_path }}/tasks/setup_dimension.yml"
|
||||
when: run_setup
|
||||
tags:
|
||||
|
@ -8,16 +8,18 @@
|
||||
file:
|
||||
path: "{{ matrix_dimension_base_path }}"
|
||||
state: directory
|
||||
mode: 0750
|
||||
mode: 0770
|
||||
owner: "{{ matrix_user_username }}"
|
||||
group: "{{ matrix_user_username }}"
|
||||
group: "{{ matrix_dimension_user_gid }}"
|
||||
when: matrix_dimension_enabled
|
||||
|
||||
- name: Ensure dimension environment variables file created
|
||||
template:
|
||||
src: "{{ role_path }}/templates/config.yaml.j2"
|
||||
dest: "{{ matrix_dimension_base_path }}/config.yaml"
|
||||
mode: 0644
|
||||
mode: 0640
|
||||
owner: "{{ matrix_user_username }}"
|
||||
group: "{{ matrix_dimension_user_gid }}"
|
||||
when: matrix_dimension_enabled
|
||||
|
||||
- name: Ensure dimension image is pulled
|
||||
@ -46,6 +48,7 @@
|
||||
stat:
|
||||
path: "/etc/systemd/system/matrix-dimension.service"
|
||||
register: matrix_dimension_service_stat
|
||||
when: not matrix_dimension_enabled
|
||||
|
||||
- name: Ensure matrix-dimension is stopped
|
||||
service:
|
||||
|
7
roles/matrix-dimension/tasks/validate_config.yml
Normal file
7
roles/matrix-dimension/tasks/validate_config.yml
Normal file
@ -0,0 +1,7 @@
|
||||
- name: Fail if required Dimension settings not defined
|
||||
fail:
|
||||
msg: >-
|
||||
You need to define a required configuration setting (`{{ item }}`) for using Dimension.
|
||||
with_items:
|
||||
- "matrix_dimension_access_token"
|
||||
when: "matrix_dimension_enabled and vars[item] == ''"
|
Reference in New Issue
Block a user