File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 6262echo " # Generating ~/tmp/clouds-$OS_CLOUD .yaml ..."
6363OLD_UMASK=$( umask)
6464umask 0177
65- APPEND =" $SECRETS " RMVCOMMENT=1 REMOVE=cacert extract_yaml clouds.$OS_CLOUD < $CLOUDS_YAML | sed " s/^\\ (\\ s*\\ )\\ ($OS_CLOUD \\ ):/\\ 1openstack:/" > ~ /tmp/clouds-$OS_CLOUD .yaml
65+ INJECTSUB =" $SECRETS " INJECTSUBKWD= " auth " RMVCOMMENT=1 REMOVE=cacert extract_yaml clouds.$OS_CLOUD < $CLOUDS_YAML | sed " s/^\\ (\\ s*\\ )\\ ($OS_CLOUD \\ ):/\\ 1openstack:/" > ~ /tmp/clouds-$OS_CLOUD .yaml
6666umask $OLD_UMASK
6767# FIXME: We will provide more settings in cluster-settings.env later, hardcode it for now
6868# if test "$CS_CCMLB=octavia-ovn"; then OCTOVN="--set octavia_ovn=true"; else unset OCTOVN; fi
Original file line number Diff line number Diff line change @@ -51,6 +51,7 @@ islinecomment()
5151# Environment to pass special functions
5252# $RMVTREE nonempty: Do not output yaml path leading to this section
5353# $INSERT and $APPEND is text injected in the outputted block (at beginning and end resp.)
54+ # $INJECTSUB and $INJECTSUBKWD: inject text $INJECTSUB after the subsection $INJECTSUBKWD has been found
5455# $REMOVE is a tag to filter out
5556# $RMVCOMMTENT nonempty: Strip comments
5657#
@@ -95,6 +96,10 @@ extract_yaml_rec()
9596 if test -z " $REMOVE " || ! startswith " $previndent$more$REMOVE :" " $line " ; then
9697 echo " $line "
9798 fi
99+ if test -n " $INJECTSUB " -a -n " $INJECTSUBKWD " && startswith " $previndent$more$INJECTSUBKWD :" " $line " ; then
100+ echo " $INJECTSUB "
101+ unset INJECTSUB
102+ fi
98103 continue
99104 fi
100105 # b2: Search for the keyword
You can’t perform that action at this time.
0 commit comments