Tighten podman ansible tasks based on manual testing

- Use 'started successfully' instead of just 'started' for changed_when
- Use specific failed_when: rc not in [0, 125] instead of false
- 125 = already exists (init) or already running (start)

Tested manually on indri - podman machine initialized and running.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Erich Blume 2026-01-17 16:58:35 -08:00
commit 2c8ced07b4

View file

@ -458,14 +458,14 @@ ansible/roles/podman/
cmd: podman machine init --cpus 4 --memory 8192 --disk-size 100
register: podman_init
changed_when: podman_init.rc == 0
failed_when: false # May already exist
failed_when: podman_init.rc not in [0, 125] # 125 = already exists
- name: Start podman machine
ansible.builtin.command:
cmd: podman machine start
register: podman_start
changed_when: "'started' in podman_start.stdout"
failed_when: false # May already be running
changed_when: "'started successfully' in podman_start.stdout"
failed_when: podman_start.rc not in [0, 125] # 125 = already running
```
**Testing:**