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 32D62227B94 for ; Fri, 3 Oct 2025 20:20:02 +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=1759522803; cv=none; b=aVDjA5s1c2Bi96iRXgbxe7mB8xD+I3xoV5kPdywQLBr+myq/J/h+sVEvaFqHA6tLk+7KwwP3an0sOmdQB6RO6AnL2RZIU13liKeNZqyyNLgr21DTOgvM3h4y5WeAMa0r3PA4D4VCTsj8Gf78nKT98rCQXWmhDbYXdoEXyLHX3o4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759522803; c=relaxed/simple; bh=3lP6oqrTN1jbbR92MvKsLuud/08nZta+Q7Hm87+X4/o=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=FbVTEEhl0VyMMu2SSs0da3C7HQwyN7rrvhzcbK1M/eWDweCRXn8QMuCNBZbRM05mHHODj19bS3ZP2as8Fdv24w2M5pEHCe2DU16vG86P35d9ZeBZpQMWpPHW1cq9MPXAOStzmjMpKaCRjGpqAyargToa6sgLalnjmQHvLKxtMOc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=hF+aETrI; 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="hF+aETrI" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8CA5EC4CEFC; Fri, 3 Oct 2025 20:20:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1759522802; bh=3lP6oqrTN1jbbR92MvKsLuud/08nZta+Q7Hm87+X4/o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hF+aETrIPwesEfJ08DOHBYzVk8mXK3Nb8WgEcpFPF25BUcrbF73O9jlTo2eCKBIBh +hBboYA4uyBx4a/v9667DqSovPRCx8qUiGDytpnIqocvYqrtavttA3guX8LoDMwp9D fnVhONlTDqgvxIDEvVLIh36P/DrdDfanZJdUUubZROSHNwGN0ag5lu/7kV9hK6TYAD ClL+u4/19kY2mYyRG46XXhbqa/gf5zjFVpnI3hMWWxXYIU5FptmB8ul9Xv5XoHy8+I pHjnYs23ThniYeLK9SW8bSzWFtDrKNtwH/1g2uo2GVmz+QgzzNHzESGMyenKG2cRo/ PQ/sfvQwi0JTQ== From: Chuck Lever To: Cc: Luis Chamberlain Subject: [PATCH v2 4/8] nfsd_add_export: fix become method for filesystem formatting Date: Fri, 3 Oct 2025 16:19:52 -0400 Message-ID: <20251003201958.24452-5-cel@kernel.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20251003201958.24452-1-cel@kernel.org> References: <20251003201958.24452-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: 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 Signed-off-by: Chuck Lever --- 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 c366a13ff546..aaaf1de17993 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