unman / shaker

19 stars 13 forks source link

Any way in salt to apply to all files? #5

Closed tlaurion closed 2 years ago

tlaurion commented 2 years ago

https://github.com/unman/shaker/blob/449db5cce296142aed3fde3f0695b2ccf769f018/cacher/change_templates.sls#L9

Questioning here because if it could, then it should probably be applied to all repos deployed for arch Debian and Fedora in a seperate change_all_templates.sls and maybe even applied before qubes updates when cacher is deployed?

(Don't hesitate to point me to your notes directly. That's it, you made me curious again at salt and got me motivated to get a real shot at it this time).

Thank you @unman

unman commented 2 years ago

I've added a page on using jinja in salt at unman/notes, with an example of targeting with wild card.

This package was intended to be applied at install when repos were limited and defined. Extending it to wild cards is a good idea. Thanks.

tlaurion commented 2 years ago

and maybe even applied before qubes updates when cacher is deployed?

@unman any idea how to implement this?

tlaurion commented 2 years ago

@unman

I read

https://forum.qubes-os.org/t/simple-set-up-of-new-qubes-and-software/13064

https://qubes.3isec.org/tasks.html

And have to say! Finally :)

But the question above stays. For cacher, anything qubes update should reapply your replace script so that anything https is changed to use the caching proxy at least when qubes applies updates on the next run.

Looked a bit and didn't find, but just as the updater applies some salt in the update process, the find and replace script should be called per qubes updater so that all updates are cached.

This is the only stopper I have promoting your cacher.

I really hope this project makes its way to contrib packages at some point?

unman commented 2 years ago

Installing the cacher package will rewrite definitions for all existing repositories in existing templates.

Hooking in to qubes updater would be possible but goes beyond the scope of an unofficial package. If new repositories or new templates are added the replace script will need to be applied to them (repos or templates). I see no way round this.

tlaurion commented 7 months ago

Installing the cacher package will rewrite definitions for all existing repositories in existing templates. Hooking in to qubes updater would be possible but goes beyond the scope of an unofficial package. If new repositories or new templates are added the replace script will need to be applied to them (repos or templates). I see no way round this.

@unman PoC to resolve this in separate issue https://github.com/unman/shaker/issues/17#issuecomment-1242783939