refactor file management: 17-roles.yml
file management per device is painful, from there I got to generic files that serve multiple devices. And now, I found a way to handle them with more ease
the idea is to extend the concept of 15-packages.yml but for files
we need a fast syntax such as I did for commit c2a335b4 [1] and another that clearly specifies source and destination
[1]
# role definitions
temba_base: &temba_base
- /etc/shadow.erb
- /etc/profile
- /etc/dropbear/authorized_keys.erb
bmx6_base: &bmx6_base
files:
- *temba_base
- /usr/local/bin/bmx6_health.sh
# bmx6 health crontab
- /etc/crontabs/root
- /etc/config/bmx6.erb
- /etc/config/firewall.erb
- /etc/config/network.erb
- /etc/config/wireless.erb
# TODO in general you don't want system to be a template
# it could be overridden or added from devices yaml part
#- /etc/config/system.erb
Edited by pedrolab