From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A8019214801 for ; Thu, 4 Sep 2025 15:15:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756998944; cv=none; b=o6KNRnjst1n31t1ocH4bKDzGNzMRLQrtoJQYM7DZMuab8QbRERugQMnNJbZwD+9pH2ogPmtj6n4ScFGJQaUOLYKR77HpHpNXP3j4YArROofr5k8+pJpR67gFv/rvOgrJVCQSAHYH1uif3ad+D/gSPaOVpfDZU4uGv3lakzI5uig= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756998944; c=relaxed/simple; bh=sl5YXg6eLsskkRBRqFnIjabTLYoT87DWpBDXSG+wa9Q=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=l0JEsy8WWNKd3x2vRAZKjecwV5zjt+x9HGW5D3RIE0d9N9zTRDEj5NUFKpLBStvgcd/5VsWR6NJkgKHzCmWPaG6+gsPwFqHNma2cdT5Q/kAq1N4Gna7mTWYODCeKGD9KIOEdzMsewJn24j4cvuJ20BnSGJyPFsHGcE16TW6Ul0Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=uH7IO/B8; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="uH7IO/B8" Received: by smtp.kernel.org (Postfix) with ESMTPSA id F4154C4CEF0; Thu, 4 Sep 2025 15:15:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1756998944; bh=sl5YXg6eLsskkRBRqFnIjabTLYoT87DWpBDXSG+wa9Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uH7IO/B8JDEzXOQOmDiXZjMDPBIfTXgHi7kvF8kNzjQ2vxSrGwNJwh9ZliZ/Qs1dW X06WKznuG7LUUPnZmyfqClQRqlJtQnpXhyHMaWGMjdrSyY/jaW9QGoZvaemm06kPPb M0HTY3asybt/UZVO1OLKscs6qRvPg95OP4t6L9xTrQWYHAeWIwsPOP28ipgphTblJY GZsoPeftEbeM2PGFRznCNdwQpTwjrwUCHSmfoXFaFQv0sR87nqKj+bBMJ+9GTJIuhr VdIRxnFCXcWmm4QKbKXMEv7VnXzORxFOdtSPxh7Zgrqp1Xlp5sBG2W7Pza9L95DZCe wtha+/0gnQQxQ== From: Chuck Lever To: Cc: Chuck Lever , Luis Chamberlain Subject: [PATCH v3 30/36] terraform: Squelch Ansible complaints about missing inventory file Date: Thu, 4 Sep 2025 11:15:18 -0400 Message-ID: <20250904151526.1596282-31-cel@kernel.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20250904151526.1596282-1-cel@kernel.org> References: <20250904151526.1596282-1-cel@kernel.org> Precedence: bulk X-Mailing-List: kdevops@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Chuck Lever During "make", I see this warning twice when preparing a terraform- based kdevops run: [WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all' The install_terraform and gen_tfvars playbooks both run before the inventory file is created. AIUI they have to be invoked with an explicit inventory on the command line. Fixes: 0987c30034c9 ("Makefile: use inventory from ansible.cfg") Reviewed-by: Luis Chamberlain Signed-off-by: Chuck Lever --- Makefile.kdevops | 1 + playbooks/gen_tfvars.yml | 1 + playbooks/install_terraform.yml | 1 + scripts/terraform.Makefile | 1 + 4 files changed, 4 insertions(+) diff --git a/Makefile.kdevops b/Makefile.kdevops index 9c6109f3a114..fd03b392f1d9 100644 --- a/Makefile.kdevops +++ b/Makefile.kdevops @@ -9,6 +9,7 @@ PHONY := kdevops_all kdevops_terraform_deps: $(Q)ansible-playbook $(ANSIBLE_VERBOSE) \ + --inventory localhost, \ $(KDEVOPS_PLAYBOOKS_DIR)/install_terraform.yml PHONY += kdevops_terraform_deps diff --git a/playbooks/gen_tfvars.yml b/playbooks/gen_tfvars.yml index 9d75c86810b0..11437fa252d8 100644 --- a/playbooks/gen_tfvars.yml +++ b/playbooks/gen_tfvars.yml @@ -1,5 +1,6 @@ --- - name: Generate Terraform variables file (terraform/terraform.tfvars) + connection: local hosts: localhost roles: - role: gen_tfvars diff --git a/playbooks/install_terraform.yml b/playbooks/install_terraform.yml index 5a5fa724a212..3342d32a6269 100644 --- a/playbooks/install_terraform.yml +++ b/playbooks/install_terraform.yml @@ -1,5 +1,6 @@ --- - name: Install Terraform + connection: local hosts: localhost roles: - role: install_terraform diff --git a/scripts/terraform.Makefile b/scripts/terraform.Makefile index d1411a1868f1..305b287a5e6c 100644 --- a/scripts/terraform.Makefile +++ b/scripts/terraform.Makefile @@ -232,5 +232,6 @@ destroy_terraform_base: $(KDEVOPS_TFVARS): $(KDEVOPS_TFVARS_TEMPLATE) .config $(Q)ansible-playbook $(ANSIBLE_VERBOSE) \ + --inventory localhost, \ $(KDEVOPS_PLAYBOOKS_DIR)/gen_tfvars.yml \ --extra-vars=@./extra_vars.yaml -- 2.51.0