Use file.append
Merge pull request #18297 from cachedout/rh_ip_salty

Use file.append