Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot use machine's pkgs for secrets commands / custom tasks #39

Open
GeoffreyFrogeye opened this issue Apr 14, 2024 · 0 comments
Open

Comments

@GeoffreyFrogeye
Copy link
Contributor

If you want to use an executable in lollypops.deployment.ssh.command, lollypops.extraTasks.<name>.cmds or lollypops.secrets.files.<name>.cmd, you have two options:

  1. Simply use the name of the executable, e.g. ssh. This requires the executable to be in the PATH of the local machine.
  2. Use the pkgs of the remote machine, e.g. ${pkgs.openssh}/bin/ssh. This requires the pkgs of the remote machine to be similarly configured to the one of the local machine. Notably, the local and remote machine needs to be the same system.

Example use case where it's not convinient: some of the secret files I have are generated with ${pkgs.bind}/bin/tsig-keygen. Unlike ssh, bind isn't a package I have available on all the machines I'm deploying from, so I set the full path, but now I can't create secrets on my aarch64 laptop (nor my phone... theorically, I'm I haven't gone in this rabbit hole yet).

I'm thinking a way to fix that would be to make those option accept an other type from string: a function, that take the pkgs of the local machine (passed with the lollypops app) as an argument (probably a dict, so we can add more things if needed later). I would be fine with implementing that myself, but first, does it make sense?

@GeoffreyFrogeye GeoffreyFrogeye changed the title Cannot use machine's pkgs for password commands / custom taks Cannot use machine's pkgs for secrets commands / custom tasks Apr 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant