More ansible-lint fixes

This commit is contained in:
Slavi Pantaleev
2022-07-18 11:22:05 +03:00
parent 34cdaade08
commit ddf18eadc7
337 changed files with 1720 additions and 1720 deletions

View File

@ -8,4 +8,4 @@
- ansible.builtin.set_fact:
matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-client-cinny.service'] }}"
when: matrix_client_cinny_enabled|bool
when: matrix_client_cinny_enabled | bool

View File

@ -1,30 +1,30 @@
---
- import_tasks: "{{ role_path }}/tasks/init.yml"
- ansible.builtin.import_tasks: "{{ role_path }}/tasks/init.yml"
tags:
- always
- import_tasks: "{{ role_path }}/tasks/validate_config.yml"
when: "run_setup|bool and matrix_client_cinny_enabled|bool"
- ansible.builtin.import_tasks: "{{ role_path }}/tasks/validate_config.yml"
when: "run_setup | bool and matrix_client_cinny_enabled | bool"
tags:
- setup-all
- setup-client-cinny
- import_tasks: "{{ role_path }}/tasks/setup_install.yml"
when: "run_setup|bool and matrix_client_cinny_enabled|bool"
- ansible.builtin.import_tasks: "{{ role_path }}/tasks/setup_install.yml"
when: "run_setup | bool and matrix_client_cinny_enabled | bool"
tags:
- setup-all
- setup-client-cinny
- import_tasks: "{{ role_path }}/tasks/self_check.yml"
- ansible.builtin.import_tasks: "{{ role_path }}/tasks/self_check.yml"
delegate_to: 127.0.0.1
become: false
when: "run_self_check|bool and matrix_client_cinny_enabled|bool"
when: "run_self_check | bool and matrix_client_cinny_enabled | bool"
tags:
- self-check
- import_tasks: "{{ role_path }}/tasks/setup_uninstall.yml"
when: "run_setup|bool and not matrix_client_cinny_enabled|bool"
- ansible.builtin.import_tasks: "{{ role_path }}/tasks/setup_uninstall.yml"
when: "run_setup | bool and not matrix_client_cinny_enabled | bool"
tags:
- setup-all
- setup-client-cinny

View File

@ -9,7 +9,7 @@
with_items:
- {path: "{{ matrix_client_cinny_data_path }}", when: true}
- {path: "{{ matrix_client_cinny_docker_src_files_path }}", when: "{{ matrix_client_cinny_container_image_self_build }}"}
when: "item.when|bool"
when: "item.when | bool"
- name: Ensure Cinny Docker image is pulled
docker_image:
@ -17,7 +17,7 @@
source: "{{ 'pull' if ansible_version.major > 2 or ansible_version.minor > 7 else omit }}"
force_source: "{{ matrix_client_cinny_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_client_cinny_docker_image_force_pull }}"
when: "not matrix_client_cinny_container_image_self_build|bool"
when: "not matrix_client_cinny_container_image_self_build | bool"
register: result
retries: "{{ matrix_container_retries_count }}"
delay: "{{ matrix_container_retries_delay }}"
@ -32,7 +32,7 @@
become: true
become_user: "{{ matrix_user_username }}"
register: matrix_client_cinny_git_pull_results
when: "matrix_client_cinny_container_image_self_build|bool"
when: "matrix_client_cinny_container_image_self_build | bool"
- name: Ensure Cinny configuration installed
ansible.builtin.copy:
@ -62,7 +62,7 @@
dockerfile: Dockerfile
path: "{{ matrix_client_cinny_docker_src_files_path }}"
pull: true
when: "matrix_client_cinny_container_image_self_build|bool"
when: "matrix_client_cinny_container_image_self_build | bool"
- name: Ensure matrix-client-cinny.service installed
ansible.builtin.template:
@ -74,4 +74,4 @@
- name: Ensure systemd reloaded after matrix-client-cinny.service installation
ansible.builtin.service:
daemon_reload: true
when: "matrix_client_cinny_systemd_service_result.changed|bool"
when: "matrix_client_cinny_systemd_service_result.changed | bool"

View File

@ -1,6 +1,6 @@
---
- name: Check existence of matrix-client-cinny.service
stat:
ansible.builtin.stat:
path: "{{ matrix_systemd_path }}/matrix-client-cinny.service"
register: matrix_client_cinny_service_stat
@ -11,18 +11,18 @@
enabled: false
daemon_reload: true
register: stopping_result
when: "matrix_client_cinny_service_stat.stat.exists|bool"
when: "matrix_client_cinny_service_stat.stat.exists | bool"
- name: Ensure matrix-client-cinny.service doesn't exist
ansible.builtin.file:
path: "{{ matrix_systemd_path }}/matrix-client-cinny.service"
state: absent
when: "matrix_client_cinny_service_stat.stat.exists|bool"
when: "matrix_client_cinny_service_stat.stat.exists | bool"
- name: Ensure systemd reloaded after matrix-client-cinny.service removal
ansible.builtin.service:
daemon_reload: true
when: "matrix_client_cinny_service_stat.stat.exists|bool"
when: "matrix_client_cinny_service_stat.stat.exists | bool"
- name: Ensure Cinny paths doesn't exist
ansible.builtin.file: