mirror of https://github.com/ceph/ceph-ansible.git
lint: fix error [301], add `changed_when: false` when needed
This commit fixes the error [301]:
`[301] Commands should not change things if nothing needs doing`
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 327d564106
)
pull/4403/head
parent
8f781198d6
commit
a3cbb59c05
|
@ -62,6 +62,7 @@
|
||||||
|
|
||||||
- name: "set the dashboard port ({{ dashboard_port }})"
|
- name: "set the dashboard port ({{ dashboard_port }})"
|
||||||
command: "{{ container_exec_cmd }} ceph config set mgr mgr/dashboard/server_port {{ dashboard_port }}"
|
command: "{{ container_exec_cmd }} ceph config set mgr mgr/dashboard/server_port {{ dashboard_port }}"
|
||||||
|
changed_when: false
|
||||||
delegate_to: "{{ groups[mon_group_name][0] }}"
|
delegate_to: "{{ groups[mon_group_name][0] }}"
|
||||||
run_once: true
|
run_once: true
|
||||||
|
|
||||||
|
@ -69,6 +70,8 @@
|
||||||
command: "{{ container_exec_cmd }} ceph config set mgr mgr/dashboard/ssl_server_port {{ dashboard_port }}"
|
command: "{{ container_exec_cmd }} ceph config set mgr mgr/dashboard/ssl_server_port {{ dashboard_port }}"
|
||||||
delegate_to: "{{ groups[mon_group_name][0] }}"
|
delegate_to: "{{ groups[mon_group_name][0] }}"
|
||||||
run_once: true
|
run_once: true
|
||||||
|
changed_when: false
|
||||||
|
failed_when: false # Do not fail if the option does not exist, it only exists post-14.2.0
|
||||||
|
|
||||||
- name: disable mgr dashboard module (restart)
|
- name: disable mgr dashboard module (restart)
|
||||||
command: "{{ container_exec_cmd }} ceph mgr module disable dashboard"
|
command: "{{ container_exec_cmd }} ceph mgr module disable dashboard"
|
||||||
|
@ -94,6 +97,7 @@
|
||||||
register: ac_result
|
register: ac_result
|
||||||
delegate_to: "{{ groups[mon_group_name][0] }}"
|
delegate_to: "{{ groups[mon_group_name][0] }}"
|
||||||
run_once: true
|
run_once: true
|
||||||
|
changed_when: false
|
||||||
until: ac_result.rc == 0
|
until: ac_result.rc == 0
|
||||||
|
|
||||||
- name: set grafana url
|
- name: set grafana url
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
retries: 30
|
retries: 30
|
||||||
delay: 5
|
delay: 5
|
||||||
delegate_to: "{{ groups[mon_group_name][0] }}"
|
delegate_to: "{{ groups[mon_group_name][0] }}"
|
||||||
|
changed_when: false
|
||||||
until:
|
until:
|
||||||
- mgr_dump.rc == 0
|
- mgr_dump.rc == 0
|
||||||
- (mgr_dump.stdout | from_json).available | bool
|
- (mgr_dump.stdout | from_json).available | bool
|
||||||
|
|
Loading…
Reference in New Issue