public inbox for kdevops@lists.linux.dev
 help / color / mirror / Atom feed
From: Chuck Lever <cel@kernel.org>
To: Luis Chamberlain <mcgrof@kernel.org>
Cc: kdevops@lists.linux.dev, Chuck Lever <chuck.lever@oracle.com>
Subject: Re: [RFC PATCH 2/2] ansible.cfg: generate an ansible.cfg file in TOPDIR
Date: Fri, 29 Aug 2025 09:39:41 -0400	[thread overview]
Message-ID: <05f60242-0623-438e-9f68-a1c180934396@kernel.org> (raw)
In-Reply-To: <aLGNoKMqDG53Il_Q@bombadil.infradead.org>

On 8/29/25 7:23 AM, Luis Chamberlain wrote:
> On Thu, Aug 28, 2025 at 04:28:27PM -0400, Chuck Lever wrote:
>> From: Chuck Lever <chuck.lever@oracle.com>
>>
>> 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.
>>
>> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
>> ---
>>  Makefile                     |  8 ++++++++
>>  kconfigs/Kconfig.ansible_cfg | 12 ++++++++++++
>>  2 files changed, 20 insertions(+)
>>
>> diff --git a/Makefile b/Makefile
>> index b6fdbe67fc07..b014faa5632e 100644
>> --- a/Makefile
>> +++ b/Makefile
>> @@ -27,10 +27,15 @@ KDEVOPS_NODES_ROLE_TEMPLATE_DIR :=		$(KDEVOPS_PLAYBOOKS_DIR)/roles/gen_nodes/tem
>>  export KDEVOPS_NODES_TEMPLATE :=
>>  export KDEVOPS_MRPROPER :=
>>  
>> +ifeq (y,$(CONFIG_ANSIBLE_CFG_FILE_DEFAULT))
>> +ANSIBLE_CFG_FILE := $(TOPDIR_PATH)/ansible.cfg
>> +export ANSIBLE_CONFIG := $(ANSIBLE_CFG_FILE)
>> +else
>>  ifneq ($(strip $(CONFIG_ANSIBLE_CFG_FILE)),)
>>  ANSIBLE_CFG_FILE := $(shell echo $(CONFIG_ANSIBLE_CFG_FILE) | tr --delete '"')
>>  export ANSIBLE_CONFIG := $(ANSIBLE_CFG_FILE)
>>  endif
>> +endif
>>  ANSIBLE_INVENTORY_FILE := $(shell echo $(CONFIG_ANSIBLE_CFG_INVENTORY) | tr --delete '"')
>>  
>>  KDEVOPS_INSTALL_TARGETS :=
>> @@ -86,6 +91,9 @@ CFLAGS += $(INCLUDES)
>>  ANSIBLE_EXTRA_ARGS += kdevops_version='$(PROJECTRELEASE)'
>>  ANSIBLE_EXTRA_ARGS += topdir_path_has_sha256sum='$(TOPDIR_PATH_HAS_SHA256SUM)'
>>  ANSIBLE_EXTRA_ARGS += topdir_path_sha256sum='$(TOPDIR_PATH_SHA256SUM)'
>> +ifeq (y,$(CONFIG_ANSIBLE_CFG_FILE_DEFAULT))
>> +ANSIBLE_EXTRA_ARGS += ansible_cfg_file='$(ANSIBLE_CFG_FILE)'
>> +endif
>>  
>>  export KDEVOPS_HOSTS_TEMPLATE := hosts.j2
>>  
>> diff --git a/kconfigs/Kconfig.ansible_cfg b/kconfigs/Kconfig.ansible_cfg
>> index dbd189f5d19e..a44f760912cf 100644
>> --- a/kconfigs/Kconfig.ansible_cfg
>> +++ b/kconfigs/Kconfig.ansible_cfg
>> @@ -18,6 +18,16 @@ config ANSIBLE_CFG_INVENTORY_SET_BY_CLI
>>  	bool
>>  	default $(shell, scripts/check-cli-set-var.sh KDEVOPS_HOSTS)
>>  
>> +config ANSIBLE_CFG_FILE_DEFAULT
>> +	bool "Use a sensible default location for the ansible.cfg file"
> 
>> +	default N
> 
> defaults are always n, so this line can be removed.
> 
>> +	help
>> +	  When this option is set to Y, kdevops creates an ansible.cfg
>> +	  in a sensible default location, using the settings defined
>> +	  in this Kconfig menu.
> 
> Why would we not want this by default?

Because N matches the current behavior.

But I would prefer Y, actually.


-- 
Chuck Lever

  reply	other threads:[~2025-08-29 13:39 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-28 20:28 [RFC PATCH 0/2] Set TOPDIR at run time Chuck Lever
2025-08-28 20:28 ` [RFC PATCH 1/2] Set TOPDIR_PATH and generate its sha256sum " Chuck Lever
2025-08-29 11:19   ` Luis Chamberlain
2025-08-29 13:38     ` Chuck Lever
2025-09-01 11:29   ` Daniel Gomez
2025-08-28 20:28 ` [RFC PATCH 2/2] ansible.cfg: generate an ansible.cfg file in TOPDIR Chuck Lever
2025-08-29 11:23   ` Luis Chamberlain
2025-08-29 13:39     ` Chuck Lever [this message]
2025-08-29 16:59       ` Luis Chamberlain
2025-09-01 12:00   ` Daniel Gomez
2025-09-01 15:03     ` Chuck Lever
2025-09-01 17:07       ` Daniel Gomez

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=05f60242-0623-438e-9f68-a1c180934396@kernel.org \
    --to=cel@kernel.org \
    --cc=chuck.lever@oracle.com \
    --cc=kdevops@lists.linux.dev \
    --cc=mcgrof@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox