Fix no-changed-when ansible-lint errors

Reference: https://ansible-lint.readthedocs.io/en/latest/default_rules/#no-changed-when
This commit is contained in:
Slavi Pantaleev
2022-07-18 15:08:10 +03:00
parent 0ab2001ce7
commit 1693c4ca1d
15 changed files with 116 additions and 56 deletions

View File

@ -19,7 +19,10 @@
- name: Wait a while, so that Dendrite can manage to start
ansible.builtin.pause:
seconds: 7
when: "start_result.changed"
when: start_result.changed | bool
- name: Register user
ansible.builtin.command: "{{ matrix_local_bin_path }}/matrix-dendrite-create-account {{ username|quote }} {{ password|quote }}"
ansible.builtin.command:
cmd: "{{ matrix_local_bin_path }}/matrix-dendrite-create-account {{ username|quote }} {{ password|quote }}"
register: matrix_dendrite_register_user_result
changed_when: matrix_dendrite_register_user_result.rc == 0