'config_tips.md': assignment instead of comparison in elif condition
WaDoMa opened this issue · comments
config_tips.md
, line 9 (elif
-clause): you assign the value "machine2" to the variable hostname
, instead of comparing them.
Wrong: elif hostname = 'machine2':
(error is thrown)
Correct: elif hostname == 'machine2':
(runs)
Great work, though: it is useful, to automatically adapt the paths for different machines by a single config-file. Thank you for this inspiring approach!
Good catch. If you couldn't tell, I didn't carefully review the configuration tips. I'll fix it.
I use this approach a lot on my end as I like to track my configs under git but I need quite a bit of logic for things like different machines or even different networks for the same machine. One advantage of syncrclone is that is can work in any topology but it needs different names.
This is why I chose a python-executed config file. It has its security downsides but as far as I am concerned, if you have access to the machine to call it, you can already do whatever bad action you want!
I am not sure if this is the best venue or not but I am very open to feedback about how it works and how hard it was to configure.
Anyway, I'll fix the docs