Equivalent of secrets.yaml to store IP address

A number of devices are assigned static IP addresses and when changing routers, it’s difficult process to go through the config file to change each one.

Could we include a hosts.yaml file that contains mappings in the same way secrects.yaml works and reference like

my_integration: !host device_name

You can use the secrets file for ip addresses as well.

secrets.yaml is excluded from git uploads whereas IP addresses are less sensitive and can be backed up.

But presumably you still back it up, otherwise you’re going to have a nightmare if you have a system failure!

Put them in secrets and back the file up.

You can use an obfuscation script and put it on GitHub, or you can keep it in your gitignore and then run a separate script to back the whole thing up to Dropbox, or use rsync to create a remote backup, or Google drive backup manager and a mapped Samba share, or a combination of all of the above.

1 Like

Why are people using IP addresses. That is what DNS is for. Like since 1985.

Setting up DNS inside your house is non-trivial, especially for those without extensive network experience. I’m more savvy than most non-network professionals, and still struggle with it.

My solution is software router (PFSense) and static DHCP assignments. But I’ve given up trying to get DNS to work.

Dnsmasq works well, it combines a dhcp server and dns, including local dns.