Re: [PATCH v3 36/36] inventory: generate the inventory pathname dynamically
Daniel Gomez <[email protected]>
| Newsgroups | dev.linux.lists.kdevops |
|---|---|
| Organization | kernel.org |
| Message-ID | <[email protected]> |
On 04/09/2025 17.15, Chuck Lever wrote: > From: Chuck Lever <[email protected]> > > My CI workflows need the inventory location to be determined at run > time, not set by the kdevops .config file, so the .configs can be > portable amongst test runners and test branches. > > Reviewed-by: Luis Chamberlain <[email protected]> > Signed-off-by: Chuck Lever <[email protected]> > --- > Makefile | 8 ++++++++ > kconfigs/Kconfig.ansible_cfg | 12 ++++++++++++ > 2 files changed, 20 insertions(+) > > diff --git a/Makefile b/Makefile > index 3c48fea1421e..082e5744fc63 100644 > --- a/Makefile > +++ b/Makefile > @@ -35,7 +35,12 @@ else > ANSIBLE_CFG_FILE := $(TOPDIR_PATH)/ansible.cfg > export ANSIBLE_CONFIG := $(ANSIBLE_CFG_FILE) > endif > + > +ifeq (y,$(CONFIG_ANSIBLE_CFG_INVENTORY_CUSTOM)) > ANSIBLE_INVENTORY_FILE := $(shell echo $(CONFIG_ANSIBLE_CFG_INVENTORY) | tr --delete '"') > +else > +ANSIBLE_INVENTORY_FILE := $(TOPDIR_PATH)/hosts > +endif Sandboxing patches will likely change this. As noted earlier, sandboxing lets kdevops users choose where to place the inventory file (hosts) and other artifacts (.config, *vars*.yaml, etc). To support this, kdevops sources and artifacts must be decoupled from TOPDIR. Earlier cleanups and inventory customization were steps toward enabling this. Hope I'm not missing any possible incompatible path between this enablement and sandboxing. Reviewed-by: Daniel Gomez <[email protected]>