diff --git a/tasks/cancel_linger.yml b/tasks/cancel_linger.yml index 00d38c20..9eb67ff6 100644 --- a/tasks/cancel_linger.yml +++ b/tasks/cancel_linger.yml @@ -63,7 +63,7 @@ removes: /var/lib/systemd/linger/{{ __podman_linger_user }} - name: Wait for user session to exit closing state # noqa no-handler - command: loginctl show-user -P State {{ __podman_linger_user | quote }} + command: loginctl show-user --value -p State {{ __podman_linger_user | quote }} register: __user_state changed_when: false until: __user_state.stdout != "closing" @@ -82,7 +82,7 @@ state: stopped - name: Wait for user session to exit closing state - command: loginctl show-user -P State {{ __podman_linger_user | quote }} + command: loginctl show-user --value -p State {{ __podman_linger_user | quote }} changed_when: false register: __user_state until: __user_state.stderr is match(__pat) or diff --git a/tests/files/quadlet-basic.network b/tests/templates/quadlet-basic.network.j2 similarity index 62% rename from tests/files/quadlet-basic.network rename to tests/templates/quadlet-basic.network.j2 index 5b002ba9..3419e3dc 100644 --- a/tests/files/quadlet-basic.network +++ b/tests/templates/quadlet-basic.network.j2 @@ -2,4 +2,6 @@ Subnet=192.168.29.0/24 Gateway=192.168.29.1 Label=app=wordpress +{% if podman_version is version("4.7.0", ">=") %} NetworkName=quadlet-basic-name +{% endif %} diff --git a/tests/tests_quadlet_basic.yml b/tests/tests_quadlet_basic.yml index 5a06864a..9563a60c 100644 --- a/tests/tests_quadlet_basic.yml +++ b/tests/tests_quadlet_basic.yml @@ -19,15 +19,15 @@ state: present data: "{{ __json_secret_data | string }}" __podman_quadlet_specs: - - file_src: files/quadlet-basic.network + - template_src: templates/quadlet-basic.network.j2 state: started - name: quadlet-basic-unused-network type: network Network: {} - name: quadlet-basic-mysql type: volume - Volume: - VolumeName: quadlet-basic-mysql-name + Volume: "{{ {} if podman_version is version('4.7.0', '<') + else {'VolumeName': 'quadlet-basic-mysql-name'} }}" - name: quadlet-basic-unused-volume type: volume Volume: {}