From 0630f78d6b737b38828e3a4245abc69076caffcf Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 11 Dec 2016 12:40:50 +0100 Subject: Adding YAML export format to container list command. Signed-off-by: Daniel Baumann --- lib/container/list | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'lib/container') diff --git a/lib/container/list b/lib/container/list index 45430a4..2be55b5 100755 --- a/lib/container/list +++ b/lib/container/list @@ -162,6 +162,15 @@ EOF shell) echo "${CONTAINER}" ;; + + yaml) + +cat << EOF + - name: ${CONTAINER} + ipv4_address: ${ADDRESS} +EOF + + ;; esac } @@ -257,6 +266,21 @@ cat << EOF EOF ;; + + yaml) + +cat << EOF +--- +container_tools: + version: ${VERSION} + +host: + name: ${HOST} + +container: +EOF + + ;; esac CONTAINERS="$(cd "${MACHINES}" 2>/dev/null && find -maxdepth 1 -type d -and -not -name '.container-tools' -and -not -name 'container-tools' -and -not -name 'lost+found' -and -not -name '.snap' -and -not -name '.snapshot' -printf '%P\n' | sort)" -- cgit v1.2.3