]> git.apps.os.sepia.ceph.com Git - ceph-build.git/commitdiff
ansible: Fixes to podman subuid/subgid checks 2332/head
authorDavid Galloway <david.galloway@ibm.com>
Fri, 28 Feb 2025 18:55:16 +0000 (13:55 -0500)
committerDavid Galloway <david.galloway@ibm.com>
Fri, 28 Feb 2025 18:55:16 +0000 (13:55 -0500)
I think this was working during my testing because sub{u,g}id_check.rc /wasn't/ 0.  I had manually modified the system so it wasn't in the same state as a fresh cloud instance.

I manually ran this playbook on an instance and confirmed it gets past the podman setup now.

Signed-off-by: David Galloway <david.galloway@ibm.com>
ansible/examples/builder.yml

index 9d74326b5e9b2149ef78a94e993f1f3a219cc2d9..62aa573d3119f9bc4bd84d37701889c98072353d 100644 (file)
       changed_when: false
 
     - name: Find highest used subuid
-      command: "awk -F: '{print $2+$3}' /etc/subuid | sort -n | tail -1"
+      shell: "awk -F: '{print $2+$3}' /etc/subuid | sort -n | tail -1"
       register: highest_subuid
-      when: subuid_check.rc != 0 or subgid_check.rc != 0
+      when: subuid_check.rc == 0 or subgid_check.rc == 0
       changed_when: false
 
     - name: Set next available UID range