Re: [RFC PATCH 2/2] ansible.cfg: generate an ansible.cfg file in TOPDIR
Daniel Gomez <[email protected]>
| Newsgroups | dev.linux.lists.kdevops |
|---|---|
| Organization | kernel.org |
| Message-ID | <[email protected]> |
On 01/09/2025 17.03, Chuck Lever wrote: > On 9/1/25 8:00 AM, Daniel Gomez wrote: >> On 28/08/2025 22.28, Chuck Lever wrote: >>> From: Chuck Lever <[email protected]> >>> >>> I need an ansible.cfg that is generated by the Kconfig menu, but >>> whose pathname is selected dynamically based on where kdevops is >>> being run rather than having that path baked into the .config. >> >> I'm trying to review the previous conversation before these patches as well as >> this series. Please, let me know if I'm understanding something wrong: >> >> I think what we need is not to have individual configuration paths (as we >> have now) for ansible.cfg, inventory, etc. What we want is to have one sandbox >> folder, our TOPDIR, and have our kdevops sandbox directory there. All files >> generated and consumed by kdevops should then use that path. >> >> Would this work? > > Well I think that would work for my particular usage, however: If I'm > reading between the lines of the Ansible pathname help texts, it appears > that these settings can specify search paths, not a single file. > > In particular, the ANSIBLE_CFG_INVENTORY_FILE string is a comma- > separated list. And, if ANSIBLE_CFG_FILE is an empty string, then there > is a default set of locations /outside of/ the CWD that Ansible searches > for a configuration. That case will never happen, as we will ensure our sandbox var is always defined (either with O=, or with PWD) and therefore the location of the kdevops artifacts (.config, ansible.cfg, inventory, etc). That should preserve the current functionality while also allowing others to generate kdevops artifacts into separate directories. > > I'm not against your suggestion of specifying a sandbox pathname at all; > that would be a good UX simplification. There are these details, though, > and I don't have any suggestions about that at the moment. Great! And agreed. Even if my assessment above is wrong, I don't see any major blockers.