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

Support environment variable for preseed #316

Open
hayone1 opened this issue Jun 7, 2024 · 2 comments
Open

Support environment variable for preseed #316

hayone1 opened this issue Jun 7, 2024 · 2 comments

Comments

@hayone1
Copy link

hayone1 commented Jun 7, 2024

The ask is simple.
Environment variables increase the ease and option of automation by a lot.

You could read stdin first and if it's nil or empty then read the environment variable next.

cat preseed.yml | microcloud init --preseed

and

export PRESEED=$(cat preseed.yml)
microcloud init --preseed
@roosterfish
Copy link
Contributor

Hi @hayone1, can you please elaborate more on your specific automation use case? Why can't you pass the preseed file via stdin?

@hayone1
Copy link
Author

hayone1 commented Jun 10, 2024

Well, more options allow for more choices and where certain environments are limited in the use of stdin, they can defer to environment variables.

eg. I tried to debug main_init_preseed in vscode, but vscode debug cannot read from stdin.
When using ansible also, I'd prefer to set the pressed content as an environment variable because it makes things more.
And this is just me.

As potential adoption of microcloud grows, you'd definitely find cases where the ability to set env variables would be the deciding factor in choosing microcloud over other options.

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

2 participants