A local initialization stage before the explorer are run against the target? #375

Open
opened 2024-04-23 14:00:40 +00:00 by fnux · 2 comments
Collaborator

It would be nice to be able to initialize the local integration (e.g. secret management) before the explorers are executed against the target host. I haven't seen anything relevant in the doc - but there might be an easy way to hook this in the code.

I'll investigate and implement and/or document if needed.

It would be nice to be able to initialize the local integration (e.g. secret management) before the explorers are executed against the target host. I haven't seen anything relevant in the doc - but there might be an easy way to hook this in the code. I'll investigate and implement and/or document if needed.
Owner

@fnux We discussed this many, many, many years ago and called it "stages". There might be some discussion content still left in the doc/ folder of cdist.

The "TL;DR" was, afair:

  • good idea
  • Best to have it before and after

As of today I'd think about something like this:

  • new hooks/ directory
  • new hooks/pre, hooks/post directory
  • Leaving room for other hooks in the future
  • Executing scripts / binaries in those directories in "glob" order (i.e. python deterministic)

One thing that needs to be taken into account is which variables should be exported to these scripts and clearly also documented...

Also to consider whether those hooks are run before/after on a "per host* or per run basis if you are running in parallel mode (I see advantages for both).

Just my 49 Rappen.

@fnux We discussed this many, many, many years ago and called it "stages". There might be some discussion content still left in the doc/ folder of cdist. The "TL;DR" was, afair: * good idea * Best to have it *before* and *after* As of today I'd think about something like this: * new hooks/ directory * new hooks/pre, hooks/post directory * Leaving room for other hooks in the future * Executing scripts / binaries in those directories in "glob" order (i.e. python deterministic) One thing that needs to be taken into account is which variables should be exported to these scripts and clearly also documented... Also to consider whether those hooks are run before/after on a "per host* or *per run* basis if you are running in parallel mode (I see advantages for both). Just my 49 Rappen.
Author
Collaborator

That sounds pretty good. I will see if I find some time to implement an initial version.

That sounds pretty good. I will see if I find some time to implement an initial version.
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: ungleich-public/cdist#375
No description provided.