linsomniac / drbdlinks

A helper for DRBD which makes/reverts links into DRBD volumes.
GNU General Public License v2.0
8 stars 5 forks source link

Ease configuration configuration automation with /etc/drbdlinks.d/ #5

Closed ymartin59 closed 6 years ago

ymartin59 commented 7 years ago

I am writing Ansible playbook to automate my DRBD setup and I will include multiple roles on a single system. As a result, each role will have to append drbdlinks configuration with its own link directive.

The usual way to ease such modular configuration is to include files available in a .d configuration directory.

Here is a work-around I have implemented directly at the end of drbdlinks.conf because I found out it was passed through execfile

import glob
for conf in glob.iglob('/etc/drbdlinks.d/*.conf'):
    execfile(conf)
linsomniac commented 6 years ago

Implemented, thanks for the suggestion!