summaryrefslogtreecommitdiffstats
path: root/tests/roles/cli/tasks/inspect.yaml
blob: d1d80240949d3b2ca706d794c932627fc4bbf4ad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
---
- 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 }}