From 7ce47e69e7870c699425b70ec06661f51df491eb Mon Sep 17 00:00:00 2001 From: Ben Nemec Date: Tue, 10 Feb 2015 18:00:12 -0600 Subject: [PATCH] Additions to os-disk-config element Add os-*-config scripts to allow os-disk-config to actually run at deploy time on an instance. Note that it currently fails due to python-blivet not being found at build time, but I think that's an environment issue, not a problem with the element. --- .../os-apply-config/etc/os-disk-config/config.json | 3 +++ .../os-refresh-config/configure.d/20-os-disk-config | 9 +++++++++ elements/os-disk-config/package-installs.yaml | 2 ++ 3 files changed, 14 insertions(+) create mode 100644 elements/os-disk-config/os-apply-config/etc/os-disk-config/config.json create mode 100755 elements/os-disk-config/os-refresh-config/configure.d/20-os-disk-config create mode 100644 elements/os-disk-config/package-installs.yaml diff --git a/elements/os-disk-config/os-apply-config/etc/os-disk-config/config.json b/elements/os-disk-config/os-apply-config/etc/os-disk-config/config.json new file mode 100644 index 000000000..4cc8e74ee --- /dev/null +++ b/elements/os-disk-config/os-apply-config/etc/os-disk-config/config.json @@ -0,0 +1,3 @@ +{{#os_disk_config}} +{{.}} +{{/os_disk_config}} \ No newline at end of file diff --git a/elements/os-disk-config/os-refresh-config/configure.d/20-os-disk-config b/elements/os-disk-config/os-refresh-config/configure.d/20-os-disk-config new file mode 100755 index 000000000..2356d37d8 --- /dev/null +++ b/elements/os-disk-config/os-refresh-config/configure.d/20-os-disk-config @@ -0,0 +1,9 @@ +#!/bin/bash + +set -eux +set -o pipefail + +DISK_CONFIG=$(os-apply-config --key os_disk_config --type raw --key-default '') +if [ -n "$DISK_CONFIG" ]; then + os-disk-config -c /etc/os-disk-config/config.json -v +fi \ No newline at end of file diff --git a/elements/os-disk-config/package-installs.yaml b/elements/os-disk-config/package-installs.yaml new file mode 100644 index 000000000..53c318267 --- /dev/null +++ b/elements/os-disk-config/package-installs.yaml @@ -0,0 +1,2 @@ +jq: +python-blivet: