Remove nonsensical podman_enable services
This commit is contained in:
@@ -3,3 +3,57 @@
|
||||
hosts: all
|
||||
gather_facts: true
|
||||
tasks:
|
||||
- name: Verify systemd service file exists on Debian Bookworm
|
||||
stat:
|
||||
path: "/etc/systemd/system/{{ test_container }}.service"
|
||||
register: systemd_service
|
||||
when: inventory_hostname == 'debian-bookworm'
|
||||
|
||||
- name: Assert systemd service exists on Bookworm
|
||||
assert:
|
||||
that:
|
||||
- systemd_service.stat.exists
|
||||
fail_msg: "Expected systemd service file not found for {{ test_container }}"
|
||||
when: inventory_hostname == 'debian-bookworm'
|
||||
|
||||
- name: Verify quadlet .container file exists on Debian Trixie
|
||||
stat:
|
||||
path: "/etc/containers/systemd/{{ test_container }}.container"
|
||||
register: quadlet_file
|
||||
when: inventory_hostname == 'debian-trixie'
|
||||
|
||||
- name: Assert quadlet file exists on Trixie
|
||||
assert:
|
||||
that:
|
||||
- quadlet_file.stat.exists
|
||||
fail_msg: "Expected quadlet .container file not found for {{ test_container }}"
|
||||
when: inventory_hostname == 'debian-trixie'
|
||||
|
||||
- name: Verify test container service is active
|
||||
systemd:
|
||||
name: "podman-{{ test_container }}"
|
||||
state: started
|
||||
register: container_service
|
||||
ignore_errors: yes
|
||||
|
||||
- name: Check container is running
|
||||
command: podman ps --filter "name={{ test_container }}" --format="{{.Names}}"
|
||||
register: running_containers
|
||||
changed_when: false
|
||||
|
||||
- name: Assert test container is running
|
||||
assert:
|
||||
that:
|
||||
- test_container in running_containers.stdout
|
||||
fail_msg: "Test container {{ test_container }} is not running"
|
||||
|
||||
- name: Verify nginx responds on localhost
|
||||
command: curl -fsS http://127.0.0.1:8080
|
||||
register: curl_result
|
||||
changed_when: false
|
||||
|
||||
- name: Assert nginx returned content
|
||||
assert:
|
||||
that:
|
||||
- curl_result.stdout | length > 0
|
||||
fail_msg: "Expected nginx to return content on http://127.0.0.1:8080"
|
||||
|
||||
Reference in New Issue
Block a user