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 909523064B9 for ; Tue, 2 Sep 2025 13:54: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=1756821284; cv=none; b=jk95CWnKQeoWZM1qQ+7qAQlE2q/odDsaThtSpTxs8Ruvy2Ed4GkYR2iHI5+LkpEUm2Ly7YpYtY/bWfUqqz8c4qN8zIdQ1lla4ZHZ/o43fjHGG+EirSlQzM+3SVeveudZ5TYX5uAO0zYDaHsZDc4vNX//rPJahDrIEViGAzpCzGo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756821284; c=relaxed/simple; bh=LGnfsUr9D8ZVCK/caqc2jPC51km2ygR7cRPKeHOjXHo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=kDTs4AFeEUCRRhVn5xBOKLBJwGZq7xtXtwbgczEbhDxEmyE7gkFfHv/lgpAnh2hTSa9hnKuWJr5bmh3M3BYVA2F00xsPAYJWu0WaH60O4C3qL0jUuqQtIkiTzFJu2qMiUAZwI6+An39rZ7I1FKRfXO1oDFqnS/Kllcn65kAwBpo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=fqRzbWGc; 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="fqRzbWGc" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3AFCCC4CEF7; Tue, 2 Sep 2025 13:54:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1756821284; bh=LGnfsUr9D8ZVCK/caqc2jPC51km2ygR7cRPKeHOjXHo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fqRzbWGcoYWoYw9TIrc0KTGn+cZzWiRu5Ugj5SfhTZYgAUcnH93iiuIYBqJEaovro a9zbLEKDjL9CrKYCiXdQ/25uGMsSL1uuP2B+B7WeLGovyzCyecuAVqvRiqy4eljV7b 27GgeF0227IyKKFL24WA3n1ynzDYBasYc1bMvDwLIP+CL1pyCgJc2IRIRLApS+qTtY QSrxYqBmgUsNBHy5blD5LyfEYSSUhYAS6+kPquNWDfWE2avLOb0gYGZ3en+mWkRYq8 0q0cF/dAWR2eu6SBzFqGOH7GELqcioipOZxAfy/tyCFfXI9Zou8wwZ7PBENPbhcSOh Kh+Peko3nakOA== From: Chuck Lever To: Cc: Chuck Lever Subject: [PATCH v2 31/37] terraform: Squelch Ansible complaints about missing inventory file Date: Tue, 2 Sep 2025 09:54:18 -0400 Message-ID: <20250902135426.815079-32-cel@kernel.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20250902135426.815079-1-cel@kernel.org> References: <20250902135426.815079-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") 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