]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
switch_to_container: fix osd systemd regex
authorDimitri Savineau <dsavinea@redhat.com>
Thu, 4 Jun 2020 20:57:17 +0000 (16:57 -0400)
committerGuillaume Abrioux <gabrioux@redhat.com>
Tue, 16 Jun 2020 15:04:06 +0000 (17:04 +0200)
The systemd LOAD and ACTIVE fileds could have more than one space between
both values.
This update the systemd regex the same way we're using it in different
part of the code.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1843500
Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
infrastructure-playbooks/switch-from-non-containerized-to-containerized-ceph-daemons.yml

index 044891f0093b0a9f32206a5fbe4394f0eb169b18..dec3915603c72a4199f4f00d20214babbf24b2c5 100644 (file)
 
     - name: collect running osds
       shell: |
-        systemctl list-units | grep "loaded active" | grep -Eo 'ceph-osd@[0-9]+.service|ceph-volume|ceph\.target'
+        systemctl list-units | grep -E "loaded * active" | grep -Eo 'ceph-osd@[0-9]+.service|ceph-volume|ceph\.target'
       register: running_osds
       changed_when: false
       failed_when: false