Skip to content
New issue

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

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

Already on GitHub? # to your account

RFC: hiera classifier #1

Open
russellshackleford opened this issue Jan 25, 2023 · 1 comment
Open

RFC: hiera classifier #1

russellshackleford opened this issue Jan 25, 2023 · 1 comment

Comments

@russellshackleford
Copy link

I saw that you talked about a future with other ways of classifying. Would it be possible to just use a CLI option like --roles in the bolt command? That would prevent haven dozens upon dozens of files each specifying a different role.

@jay7x
Copy link
Owner

jay7x commented Jan 28, 2023

My point is to be able to run bolt plan run control_repo::apply to apply on every agent with its correct role.. i.e. you don't need to keep the agent -> role mapping in your head. This allows to do "hosts" unit testing as well (see spec/hosts for an example).

Second point is that big infras with >100 servers are out of this repo scope.. I'd say one shouldn't use push model for such big infra.

Third point is to keep the repo structure as close to an usual control repo as possible. I.e. you should be able to drop this repo into an environment directory and your puppet server should be able to use it. Though this point is not a hard requirement here.

Though I understand that writing a file per node is not the activity ppl usually like to do.. My first idea was to use bolt inventory vars for classification. I realized quickly that it doesn't work for dynamic inventories (like terraform or lima or any cloud). While agent hostnames can be static their transport settings will change frequently.. so hiera was easiest and familiar enough choice for everyone.

If you still would like to pass a role via CLI I'd say easiest way is to write another plan next to apply.pp which will read the role parameter and include it. You won't be able to use bolt apply (only bolt plan run control_repo::<new_plan>) then though..

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants