]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
common: remove unnecessary run_once statements
authorDimitri Savineau <dsavinea@redhat.com>
Tue, 20 Jul 2021 15:38:44 +0000 (11:38 -0400)
committerDimitri Savineau <savineau.dimitri@gmail.com>
Wed, 21 Jul 2021 14:01:25 +0000 (10:01 -0400)
1303611 introduced tasks for disabling the pg_autoscaler on pools and
the balancer but thoses tasks are already executed on the first monitor
node so we don't need to add the run_once statement.

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
(cherry picked from commit 738fa9428a3c0c9ed0dd1aec566e807ad072daad)

infrastructure-playbooks/rolling_update.yml
infrastructure-playbooks/switch-from-non-containerized-to-containerized-ceph-daemons.yml

index 83f98556cbfa774cf34af726191c73168c6f080d..ef9fcf27ff5d0c58fe482e8876bb10d0492cb664 100644 (file)
     - name: get balancer module status
       command: "{{ ceph_cmd }} --cluster {{ cluster }} balancer status -f json"
       register: balancer_status
-      run_once: true
       changed_when: false
 
     - name: set_fact pools_pgautoscaler_mode
       set_fact:
         pools_pgautoscaler_mode: "{{ pools_pgautoscaler_mode | default([]) | union([{'name': item.pool_name, 'mode': item.pg_autoscale_mode}]) }}"
-      run_once: true
       with_items: "{{ (pool_list.stdout | default('{}') | from_json)['pools'] }}"
 
     - name: disable balancer
       command: "{{ ceph_cmd }} --cluster {{ cluster }} balancer off"
-      run_once: true
       changed_when: false
       when: (balancer_status.stdout | from_json)['active'] | bool
 
         cluster: "{{ cluster }}"
         pg_autoscale_mode: false
       with_items: "{{ pools_pgautoscaler_mode }}"
-      run_once: true
       when:
         - pools_pgautoscaler_mode is defined
         - item.mode == 'on'
         name: "{{ item.name }}"
         cluster: "{{ cluster }}"
         pg_autoscale_mode: true
-      run_once: true
       with_items: "{{ pools_pgautoscaler_mode }}"
       when:
         - pools_pgautoscaler_mode is defined
 
     - name: re-enable balancer
       command: "{{ ceph_cmd }} --cluster {{ cluster }} balancer on"
-      run_once: true
       changed_when: false
       when: (balancer_status.stdout | from_json)['active'] | bool
 
index e14f83a31e6f2737fe83a95e92da0ea6b47d37e7..862e4ffa84f6260da44da36165c8d361a6e26f67 100644 (file)
     - name: get pool list
       command: "{{ ceph_cmd }} --cluster {{ cluster }} osd dump -f json"
       register: pool_list
-      run_once: true
       changed_when: false
 
     - name: get balancer module status
       command: "{{ ceph_cmd }} --cluster {{ cluster }} balancer status -f json"
       register: balancer_status
-      run_once: true
       changed_when: false
 
     - name: set_fact pools_pgautoscaler_mode
       set_fact:
         pools_pgautoscaler_mode: "{{ pools_pgautoscaler_mode | default([]) | union([{'name': item.pool_name, 'mode': item.pg_autoscale_mode}]) }}"
-      run_once: true
       with_items: "{{ (pool_list.stdout | default('{}') | from_json)['pools'] }}"
 
     - name: disable balancer
       command: "{{ ceph_cmd }} --cluster {{ cluster }} balancer off"
-      run_once: true
       changed_when: false
       when: (balancer_status.stdout | from_json)['active'] | bool
 
         cluster: "{{ cluster }}"
         pg_autoscale_mode: false
       with_items: "{{ pools_pgautoscaler_mode }}"
-      run_once: true
       when:
         - pools_pgautoscaler_mode is defined
         - item.mode == 'on'
         cluster: "{{ cluster }}"
         pg_autoscale_mode: true
       with_items: "{{ pools_pgautoscaler_mode }}"
-      run_once: true
       when:
         - pools_pgautoscaler_mode is defined
         - item.mode == 'on'
 
     - name: re-enable balancer
       command: "{{ ceph_cmd }} --cluster {{ cluster }} balancer on"
-      run_once: true
       changed_when: false
       when: (balancer_status.stdout | from_json)['active'] | bool