26 lines
851 B
YAML
26 lines
851 B
YAML
|
---
|
||
|
- name: buildah inspect an image by name
|
||
|
command: buildah inspect docker.io/library/nginx:latest
|
||
|
|
||
|
- name: get image ID
|
||
|
command: buildah images -q docker.io/library/nginx:latest
|
||
|
register: imgid
|
||
|
|
||
|
- name: buildah inspect an image by ID
|
||
|
command: buildah inspect --type image {{ imgid.stdout }}
|
||
|
|
||
|
- name: buildah inspect image with format
|
||
|
command: buildah inspect -t image -f {% raw %}'{{ .FromImageID }}'{% endraw %} {{ imgid.stdout }}
|
||
|
register: inspectid
|
||
|
failed_when: 'inspectid.stdout != imgid.stdout'
|
||
|
|
||
|
- name: buildah inspect container by name
|
||
|
command: buildah inspect -t container nginxc-2
|
||
|
|
||
|
- name: buildah inspect container with format
|
||
|
shell: buildah inspect -f {% raw %}'{{ .ContainerID }}'{% endraw %} nginxc-2
|
||
|
register: inspectcid
|
||
|
|
||
|
- name: buildah inspect container by ID
|
||
|
command: buildah inspect {{ inspectcid.stdout }}
|