All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chuck Lever <cel@kernel.org>
To: <kdevops@lists.linux.dev>
Cc: Luis Chamberlain <mcgrof@kernel.org>
Subject: [PATCH v2 4/8] nfsd_add_export: fix become method for filesystem formatting
Date: Fri,  3 Oct 2025 16:19:52 -0400	[thread overview]
Message-ID: <20251003201958.24452-5-cel@kernel.org> (raw)
In-Reply-To: <20251003201958.24452-1-cel@kernel.org>

From: Luis Chamberlain <mcgrof@kernel.org>

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 <mcgrof@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
 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


  parent reply	other threads:[~2025-10-03 20:20 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-03 20:19 [PATCH v2 0/8] nfs: few fixes and enhancements Chuck Lever
2025-10-03 20:19 ` [PATCH v2 1/8] defconfigs: add NFS testing configurations Chuck Lever
2025-10-03 20:19 ` [PATCH v2 2/8] devconfig: exclude nfsd from journal upload client configuration Chuck Lever
2025-10-03 20:19 ` [PATCH v2 3/8] iscsi: add missing initiator packages for Debian Chuck Lever
2025-10-03 20:19 ` Chuck Lever [this message]
2025-10-03 20:19 ` [PATCH v2 5/8] workflows: fstests: fix incorrect pNFS export configuration Chuck Lever
2025-10-03 20:19 ` [PATCH v2 6/8] nfstest: add results visualization support Chuck Lever
2025-10-03 20:19 ` [PATCH v2 7/8] fstests: add soak duration to nfs template Chuck Lever
2025-10-03 20:19 ` [PATCH v2 8/8] pynfs: add visualization support for test results Chuck Lever
2025-10-03 22:57 ` [PATCH v2 0/8] nfs: few fixes and enhancements Luis Chamberlain

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=20251003201958.24452-5-cel@kernel.org \
    --to=cel@kernel.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.