Has anyone ever used rsync to push out configs?

So on OpenWRT all the main configs are stored on /etc/config so I was thinking that it might be possible to use rsync to do mass deployments. It should just be as simple as using rsync to sync the configuration of a single device to multiple devices and then doing a restart of all services.

Anyone ever tried this? The other option would to use Ansible to run uci commands

Did you tried scp?!

You will need to restart services anyway.
Say WAN MAC is fixed and you will need to use uci with any network configs anyway. Or diff/patch.

Not the same thing as rsync only updates changed files

Yeah it probably is not worth it. However, I feel like Ansible isn't a great fit either. Ansible is made for running the same steps over and over but what really is needed is a way to set a final outcome and then have a set of steps to generate it. Maybe custom images are the best method for now.

Check OpenWISP

1 Like

I am looking for other options out of curiosity

Thanks for the suggestion though

Use your rsync, never worked for anyone but YMMV

But if we are talking about like 20 text files with under 100kb each then this is no issue....
If your device has enough resources you can also install rsync daemon...
But ansible is total overkill on Openwrt IMHO

Ansible scales well, is flexible and has the benefit of being entirely reproducible. I think it is actually a perfect match for OpenWRT with a little work.

But for most advanced ansible features you need python on the target host... And if your device is not x86 then I don't know how much fun that might be.

As others have suggested the common folklore is to use the image builder. Include everything and just flash over... Most folks I know of who do commercial Openwrt deployments do it that way too because it's the most safe procedure.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.