From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 941EF2874E6 for ; Mon, 22 Sep 2025 09:36:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.133 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758533821; cv=none; b=OA3pYsPM3HPkk9gbLfwvLatPlQ98wcdZRu+oaWLc9q9HxCSWHxTdivf1BkuT//vyqMJ9oX++e0dj8id0/NDunvgAHRmrlMYJ7Fi1PiFDM85dszWndEqTk7cNxTE9uYzwavNOqkTDa5nQlldkQVVwJ68c/EtVgFmM6awZi2IHI8w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758533821; c=relaxed/simple; bh=Pva/zRT8iDYKRTZl8T+UDjb26tDSPjNZDcPso77UkcY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=cfXNzc/+1fmfTAZpD9CAAC94k4dNTtkqD9RrsOYQb4g2YBReasfdVPboQ+dLMYdDV/+QS8gUWdwNLwugzTWzt4WiYwWgD/0C3wRR0+xlBVFe7GXG86zTQdHpBBchywC9aW6jrBshON+gfPbFzYk1SmcZ2kMea5wphJqE78o6wTU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=kernel.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=bUU7rq+b; arc=none smtp.client-ip=198.137.202.133 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="bUU7rq+b" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description; bh=HUBaYGrERn+Pf9IOXQ7XSA5fP83ItSX9R1U52AXpPJM=; b=bUU7rq+b/pBs8zRtkxCmBQGGt2 35rEQH4cu4P63m4uBJwpNcp/hSioSIKjT8CD9K/ezGBlfOQbNfkJR54f0rWEOHIcGgULO2BAemI1a gwKAw4DwJFkp6SX4PLu1rzHMiBjN9JnfifapPzHjYeuJmfIFg5PnP58HG4d3cOxYcxae0wydcYrum N3yl8kRIGcqrKdb1Qg3iI31CdJZLNJjgb750VkXKAe9yLwXqRYFhLdWnXenh/8c5DNQwTgtYoXnKU MjgMqm4BKdPowvFx3Rdlyjy0yfatDuQ2b8WpdhgeOfk/rWR+ShE2x5UEYgMmsVgE4B45uXCV4WHom sCdOTG7w==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.98.2 #2 (Red Hat Linux)) id 1v0cyf-00000009uEL-443T; Mon, 22 Sep 2025 09:36:57 +0000 From: Luis Chamberlain To: Chuck Lever , Daniel Gomez , kdevops@lists.linux.dev Cc: Luis Chamberlain Subject: [PATCH 09/13] nfsd_add_export: fix become method for filesystem formatting Date: Mon, 22 Sep 2025 02:36:51 -0700 Message-ID: <20250922093656.2361016-10-mcgrof@kernel.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20250922093656.2361016-1-mcgrof@kernel.org> References: <20250922093656.2361016-1-mcgrof@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 Sender: Luis Chamberlain The filesystem module was unable to find mkfs.xfs when using 'become_flags: "su - -c"' which changes the environment. Change to use standard 'become_method: sudo' to preserve the PATH and allow the module to find the mkfs.xfs executable. Generated-by: Claude AI Signed-off-by: Luis Chamberlain --- playbooks/roles/nfsd_add_export/tasks/storage/local.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/playbooks/roles/nfsd_add_export/tasks/storage/local.yml b/playbooks/roles/nfsd_add_export/tasks/storage/local.yml index c366a13f..aaaf1de1 100644 --- a/playbooks/roles/nfsd_add_export/tasks/storage/local.yml +++ b/playbooks/roles/nfsd_add_export/tasks/storage/local.yml @@ -11,8 +11,7 @@ - name: Format new volume for {{ export_fstype }} become: true - become_flags: "su - -c" - become_method: ansible.builtin.sudo + become_method: sudo delegate_to: "{{ server_host }}" community.general.filesystem: fstype: "{{ export_fstype }}" -- 2.51.0