image-facts
authorLorin Hochstein <lhochstein@netflix.com>
Sun, 5 Feb 2017 21:35:58 +0000 (13:35 -0800)
committerLorin Hochstein <lhochstein@netflix.com>
Sun, 5 Feb 2017 21:35:58 +0000 (13:35 -0800)
ch13/image-facts.yml [new file with mode: 0644]

diff --git a/ch13/image-facts.yml b/ch13/image-facts.yml
new file mode 100644 (file)
index 0000000..d346211
--- /dev/null
@@ -0,0 +1,13 @@
+---
+- name: get exposed ports and volumes
+  hosts: localhost
+  gather_facts: False
+  vars:
+    image: ghost
+  tasks:
+    - name: get image info
+      docker_image_facts: name=ghost
+      register: ghost
+    - debug:
+        msg: "Ports: {{ ghost.images[0].Config.ExposedPorts}}"
+