diff options
| author | Pavel Raiskup <praiskup@redhat.com> | 2014-10-22 08:54:05 +0200 |
|---|---|---|
| committer | Pavel Raiskup <praiskup@redhat.com> | 2014-10-22 08:54:05 +0200 |
| commit | 2422a081a5be0d5ac5afb122361bc283da67341f (patch) | |
| tree | cb255582060af6547dd9318c56ba0e8c761846a1 /controller/parse_credsfile | |
| parent | 922089746e1029de9be986672fcdeb6bc82e18d7 (diff) | |
| download | postgresql-setup-tests-2422a081a5be0d5ac5afb122361bc283da67341f.tar.gz postgresql-setup-tests-2422a081a5be0d5ac5afb122361bc283da67341f.tar.xz postgresql-setup-tests-2422a081a5be0d5ac5afb122361bc283da67341f.zip | |
big reorg: prepare for generalization
Try to split into three separate components -> controller, tester,
and 'tasks' (postgresql-tasks in our case). The controller
component is the main part which is able to run the task remotely.
Tester is more-like library for 'tasks' component (should be
reusable on the raw git level).
* controller: Almost separated component.
* postgresql-tasks: Likewise.
* tester: Likewise.
Diffstat (limited to 'controller/parse_credsfile')
| -rw-r--r-- | controller/parse_credsfile | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/controller/parse_credsfile b/controller/parse_credsfile new file mode 100644 index 0000000..df2a6bf --- /dev/null +++ b/controller/parse_credsfile @@ -0,0 +1,14 @@ +credsfile="private/os/$1.yml" + +while read line; do + if [[ "$line" =~ ^([a-zA-Z0-9_]*):\ ?(.*)$ ]]; then + key="${BASH_REMATCH[1]}" + if test "$key" = os_nova_password; then + key=os_password + fi + eval set ${BASH_REMATCH[2]} + eval export "${key^^}"="\"$@\"" + fi +done < "$credsfile" + +# vi: syntax=sh |
