- name: Check podman version on semaphore (local)
  hosts: semaphore
  connection: local
  gather_facts: false
  tasks:
    - name: Check podman version
      command: /usr/local/bin/podman --version
      register: podman_version
    - name: Display podman version
      debug:
        msg: "Podman version on {{ inventory_hostname }} is: {{ podman_version.stdout }}"

- name: Check podman version on other beijing nodes
  hosts: beijing:!semaphore
  gather_facts: false
  tasks:
    - name: Check podman version
      command: /usr/local/bin/podman --version
      register: podman_version
    - name: Display podman version
      debug:
        msg: "Podman version on {{ inventory_hostname }} is: {{ podman_version.stdout }}"