-
Notifications
You must be signed in to change notification settings - Fork 224
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
apply()
transfers *everything* in *all* files/ and scripts/ directories, including in the root
#3064
Comments
I think we could certainly look in to better warnings about this behavior. I do have a potential solution for you here though #1934 You can specify only the modules you care about ensuring are on the target for the apply. I'm not sure I understand your question here?
Would the feature I pointed out make that a moot point? |
I already pointed out #1934 in my original post. It does, in fact, provide a workaround, like so:
This appears to result in no files/ directories getting checked. Which means there's a doc bug, because as I pointed out, the docs for apply don't mention this argument at all. The question you quoted can be stated much more simply: by default, bolt apply(...) copies all the files/ and scripts/ directories out to the client. Why? In other words: What are they used for on the client? How can I, as a Bolt user, take advantage of those files being present on the client? Is there a minimal example for the value of performing this copy? |
We can certainly look in to better docs for this. Files that are copied over can be used like so:
|
Ah, that's super cool! Yeah, there's no indication of that in the Bolt docs that I could find, and I looked pretty hard. Thanks for the help! |
A few other related comments that seem worth sharing:
, which leaves me again wondering, what is the usefulness of copying those files out?
Whether it being more general is a good or bad thing is certainly subject to debate. :) |
One question of mine that I didn't see answered: is there, in fact, a community standard for where to store large files that only belong on some clients and are going to be distributed with upload_file()? |
This issue has not had activity for 60 days and will be marked as stale. |
This issue absolutely still exists. |
This adds documentation for the `_required_modules` parameter of the `apply` plan function, including a section that describes what the parameter does and when you would want to use it. !no-release-note
This adds documentation for the `_required_modules` parameter of the `apply` plan function, including a section that describes what the parameter does and when you would want to use it. !no-release-note
This adds a `--required-modules` command-line option that accepts a comma-separated list of modules to sync to targets during an apply run. !feature * **Add `--required-modules` and `-RequiredModules` command-line options** You can now use the `--required-modules` and `-RequiredModules` command-line options for the `bolt apply` and `Invoke-BoltApply` commands to restrict the modules synced to a target during an apply. These options accept a comma-separated list of module to sync.
This adds a `--required-modules` command-line option that accepts a comma-separated list of modules to sync to targets during an apply run. !feature * **Add `--required-modules` and `-RequiredModules` command-line options** You can now use the `--required-modules` and `-RequiredModules` command-line options for the `bolt apply` and `Invoke-BoltApply` commands to restrict the modules synced to a target during an apply. These options accept a comma-separated list of module to sync.
This issue has not had activity for 60 days and will be marked as stale. |
I do not see any of the documentation updates this issue implies. |
This issue has not had activity for 60 days and will be marked as stale. |
This issue is stale and has been closed. If you believe this is in error, |
Describe the Bug / Steps To Reproduce
I started with a completely fresh ("bolt project init") project, the only thing I changed was adding some ssh stuff to inventory.yaml so Bolt could reach my hosts.
Normal run:
Add a totally unrelated file:
Apply time increases by ~6 times:
If you turn trace logging on, there's a line like this:
I don't know if this is or is not the intended behaviour, but it's sure not the behaviour I expected!
It does this for all modules, too. All my bolt modules, that is. I tried
sticking the big file in modules/foo/files/ and it still transfers.
I have no idea why, or what use or value copying all those files provides.
It may be that the intent of #1934 was to resolve it; if so, this is a documentation bug, because this plugin packing is happening on the apply() step and https://puppet.com/docs/bolt/latest/plan_functions.html#apply doesn't mention it at all. Further, there's nothing in the apply documentation that says "heads up it's going to copy everything it might take a while".
Assuming this is the intended behaviour, and the code sure makes it look that way, I have two further issues:
, and I found no way to do this nor any discussion or examples of doing so. If this issue is the mechanism, that's fantastic, but it needs to be documented.
Environment
It's running under docker, although obviously that shouldn't matter.
The text was updated successfully, but these errors were encountered: