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

Feature request: Let batou return requested environment value in the commandline #448

Open
nichmoe opened this issue Apr 10, 2024 · 2 comments
Milestone

Comments

@nichmoe
Copy link
Contributor

nichmoe commented Apr 10, 2024

The requested feature could look something like this:

% batou return dev component.variable_A
value_of_variable_A

You specify the environment and the variable. Batou return the value as a string, similar to the Jinja implementation.

Usecase 1:
Check for the value without having to look for defaults or definitions in the environments. This saves time and gives certainty.

Usecase 2:
This can be part of a script. Then you can much more easily define checks that are part of a deployment pipeline.

@zagy zagy added this to the batou 2.6 milestone Apr 26, 2024
@elikoga
Copy link
Member

elikoga commented Aug 13, 2024

What is the semantics of the commandline argument? Currently, batou is instantiating each root component for each host individually, can the variable not be different accross hosts? Perhaps the commandline argument would be able to return the value of a variable of a component on a host, e.g. ./batou return dev host1.component1.variable1? Also I'm guessing that the variables should print the content after the configure method has been executed, right? The alternative would be to print the content of the variable as it is defined in the component, or overriden in the environment.

@elikoga
Copy link
Member

elikoga commented Aug 13, 2024

If we want to output the values just after configure, see #409 for implementation. Otherwise we could output the overrides in the environment.

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

3 participants