Prism: A library for complex multi-host configs

4 Likes

I’ve pushed a V2 for this library which completely overhauls its functionality. Now, we define tags which inherit configuration from modules as well as their parent tags. Hosts themselves are also tags, allowing you to compose your configuration in a way that no other system provides. Please check it out!

Neat! However we don’t need to introduce other abstractions on top of the module system to achieve this use case. Here’s a proof of concept deployment system that uses the module system over multiple hosts:

E.g. with its built-in SSH access module, you can write the following:

ssh.access.host1.keys.someHost1User.hasAccessTo.host2.someHost2User = true;

This will set up both authorizedKeys on host2 and knownHosts on host1, so that when logged into someHost1User@host1, one can run ssh someHost2User@host2 without any extra steps required. See my own configuration for a complete example.

While I can’t recommend using my hacked-together deployment system, because I don’t have the time to maintain it, I encourage the community to adapt this multi-host module approach (main logic here) into their own deployment tooling :slight_smile:

6 Likes