mirror of
				https://github.com/spantaleev/matrix-docker-ansible-deploy.git
				synced 2025-10-30 06:47:56 +01:00 
			
		
		
		
	More ansible-lint fixes
This commit is contained in:
		| @@ -10,7 +10,7 @@ | ||||
|     source: "{{ 'pull' if ansible_version.major > 2 or ansible_version.minor > 7 else omit }}" | ||||
|     force_source: "{{ matrix_grafana_docker_image_force_pull if ansible_version.major > 2 or ansible_version.minor >= 8 else omit }}" | ||||
|     force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_grafana_docker_image_force_pull }}" | ||||
|   when: "matrix_grafana_enabled|bool" | ||||
|   when: "matrix_grafana_enabled | bool" | ||||
|   register: result | ||||
|   retries: "{{ matrix_container_retries_count }}" | ||||
|   delay: "{{ matrix_container_retries_delay }}" | ||||
| @@ -31,7 +31,7 @@ | ||||
|     - "{{ matrix_grafana_config_path }}/provisioning/dashboards" | ||||
|     - "{{ matrix_grafana_config_path }}/dashboards" | ||||
|     - "{{ matrix_grafana_data_path }}" | ||||
|   when: matrix_grafana_enabled|bool | ||||
|   when: matrix_grafana_enabled | bool | ||||
|  | ||||
| - name: Ensure grafana.ini present | ||||
|   ansible.builtin.template: | ||||
| @@ -40,7 +40,7 @@ | ||||
|     mode: 0440 | ||||
|     owner: "{{ matrix_user_username }}" | ||||
|     group: "{{ matrix_user_groupname }}" | ||||
|   when: matrix_grafana_enabled|bool | ||||
|   when: matrix_grafana_enabled | bool | ||||
|  | ||||
| - name: Ensure provisioning/datasources/default.yaml present | ||||
|   ansible.builtin.template: | ||||
| @@ -49,7 +49,7 @@ | ||||
|     mode: 0440 | ||||
|     owner: "{{ matrix_user_username }}" | ||||
|     group: "{{ matrix_user_groupname }}" | ||||
|   when: matrix_grafana_enabled|bool | ||||
|   when: matrix_grafana_enabled | bool | ||||
|  | ||||
| - name: Ensure provisioning/dashboards/default.yaml present | ||||
|   ansible.builtin.template: | ||||
| @@ -58,7 +58,7 @@ | ||||
|     mode: 0440 | ||||
|     owner: "{{ matrix_user_username }}" | ||||
|     group: "{{ matrix_user_groupname }}" | ||||
|   when: matrix_grafana_enabled|bool | ||||
|   when: matrix_grafana_enabled | bool | ||||
|  | ||||
| - name: Ensure dashboard(s) downloaded | ||||
|   ansible.builtin.get_url: | ||||
| @@ -69,7 +69,7 @@ | ||||
|     owner: "{{ matrix_user_username }}" | ||||
|     group: "{{ matrix_user_groupname }}" | ||||
|   with_items: "{{ matrix_grafana_dashboard_download_urls_all }}" | ||||
|   when: matrix_grafana_enabled|bool | ||||
|   when: matrix_grafana_enabled | bool | ||||
|   register: result | ||||
|   retries: "{{ matrix_geturl_retries_count }}" | ||||
|   delay: "{{ matrix_geturl_retries_delay }}" | ||||
| @@ -81,19 +81,19 @@ | ||||
|     dest: "{{ matrix_systemd_path }}/matrix-grafana.service" | ||||
|     mode: 0644 | ||||
|   register: matrix_grafana_systemd_service_result | ||||
|   when: matrix_grafana_enabled|bool | ||||
|   when: matrix_grafana_enabled | bool | ||||
|  | ||||
| - name: Ensure systemd reloaded after matrix-grafana.service installation | ||||
|   ansible.builtin.service: | ||||
|     daemon_reload: true | ||||
|   when: "matrix_grafana_enabled|bool and matrix_grafana_systemd_service_result.changed" | ||||
|   when: "matrix_grafana_enabled | bool and matrix_grafana_systemd_service_result.changed" | ||||
|  | ||||
| # | ||||
| # Tasks related to getting rid of matrix-grafana (if it was previously enabled) | ||||
| # | ||||
|  | ||||
| - name: Check existence of matrix-grafana service | ||||
|   stat: | ||||
|   ansible.builtin.stat: | ||||
|     path: "{{ matrix_systemd_path }}/matrix-grafana.service" | ||||
|   register: matrix_grafana_service_stat | ||||
|  | ||||
| @@ -104,15 +104,15 @@ | ||||
|     enabled: false | ||||
|     daemon_reload: true | ||||
|   register: stopping_result | ||||
|   when: "not matrix_grafana_enabled|bool and matrix_grafana_service_stat.stat.exists" | ||||
|   when: "not matrix_grafana_enabled | bool and matrix_grafana_service_stat.stat.exists" | ||||
|  | ||||
| - name: Ensure matrix-grafana.service doesn't exist | ||||
|   ansible.builtin.file: | ||||
|     path: "{{ matrix_systemd_path }}/matrix-grafana.service" | ||||
|     state: absent | ||||
|   when: "not matrix_grafana_enabled|bool and matrix_grafana_service_stat.stat.exists" | ||||
|   when: "not matrix_grafana_enabled | bool and matrix_grafana_service_stat.stat.exists" | ||||
|  | ||||
| - name: Ensure systemd reloaded after matrix-grafana.service removal | ||||
|   ansible.builtin.service: | ||||
|     daemon_reload: true | ||||
|   when: "not matrix_grafana_enabled|bool and matrix_grafana_service_stat.stat.exists" | ||||
|   when: "not matrix_grafana_enabled | bool and matrix_grafana_service_stat.stat.exists" | ||||
|   | ||||
		Reference in New Issue
	
	Block a user