Fix diff return code in hosts element
diff exits non-zero when a diff actually exists. This causes 51-hosts to exit and fails the os-refresh-config run. This issue is manifested when doing a stack-update and a new host is added to the stack. Closes-Bug: #1355646 Change-Id: Ia0e3670960b4b136fda9b09c188baf1f23d45d6b
This commit is contained in:
parent
9f79e4cef0
commit
6bb2bab564
|
@ -20,7 +20,7 @@ write_entries() {
|
|||
f=1
|
||||
}f &&!/^# HEAT_HOSTS_END$/{next}/^# HEAT_HOSTS_END$/{f=0}!f' "$file" > "$temp"
|
||||
echo "INFO: Updating hosts file $file, check below for changes"
|
||||
diff "$file" "$temp"
|
||||
diff "$file" "$temp" || true
|
||||
cat "$temp" > "$file"
|
||||
else
|
||||
echo -ne "\n# HEAT_HOSTS_START - Do not edit manually within this section!\n" >> "$file"
|
||||
|
|
Loading…
Reference in New Issue