From: Lorin Hochstein Date: Sun, 5 Feb 2017 21:35:58 +0000 (-0800) Subject: image-facts X-Git-Url: https://git.halfball.org/?a=commitdiff_plain;h=904b1aeaa85eb7b05332fd377c91ab9c6ba30f8a;p=ansiblebook.git image-facts --- diff --git a/ch13/image-facts.yml b/ch13/image-facts.yml new file mode 100644 index 0000000..d346211 --- /dev/null +++ b/ch13/image-facts.yml @@ -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}}" +