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 46601146A66 for ; Thu, 21 Aug 2025 08:36:35 +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=1755765400; cv=none; b=Ys83gF20edxp1m5u0xXqKNFJU0GKeUMIOr53n+/7KeXMXlfvM9JsxCHWeBEC4a5E6VVYF+WNBoD64oWRnz17ZO/0zLJW6+4D+CeD8svUgXAb2AsJShhuBzkOqmWlSiiq11TcUPIWA93tqmCXAGiIzwsaVjSf6nHqA53V6FhdI+Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755765400; c=relaxed/simple; bh=SY++UwuhDy82nBPkZG9TZwq+8LpSOvX/nkiQzHs5zBc=; h=Message-ID:Date:MIME-Version:Subject:From:To:Cc:References: In-Reply-To:Content-Type; b=AlYmbH7Nt8NVq1RAUidOoWkd3RDR+a2u7Gr5CJmGraiTWSe7SawDLUZh+ebXXsqyfJcCfMWDPDnMq0Ucwgxu8bC7feVh31/991G75ECtLYFMWIgsXIgwW86aUBQCjsjGogkbxh4KWGwCjfbAc8BG81B+kfPRPdiLij395s9Y9lw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=k3W8t+2P; 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="k3W8t+2P" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E6590C4CEEB; Thu, 21 Aug 2025 08:36:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1755765395; bh=SY++UwuhDy82nBPkZG9TZwq+8LpSOvX/nkiQzHs5zBc=; h=Date:Subject:From:To:Cc:References:In-Reply-To:From; b=k3W8t+2P95+QdCCYAJsl6mYkImqDx6dCXnYqeEe8a9SCp2Pgq63splUv8crSfGNou wLROEUGm7ScOVoY3qqn8BncRJ5HU9wd4pIr10vk6lESBf8IyenA1PVsf5IGAIGnsrX DMbrG3+CysIfJVjnLLSCUYiUHOcM/1ZAZx2BISm9h1kzz1tmwzV6DBa7C4c0on+o8L hAAjnKt69a+EQQcwibWkAUZjACuH6VY2VVM3NSgNbzcRVzIWu5FHrCq+Lr4odbg8vT oeq7oQc1Fub2B7ClsIA6YN4PMwDyfpkRxxyAgr/P/lWGMRDGnByxaL/87J8fHLRrmj XRswvanhvr6aA== Message-ID: <269ef003-734d-4d70-a9d9-bf4dec997431@kernel.org> Date: Thu, 21 Aug 2025 10:36:33 +0200 Precedence: bulk X-Mailing-List: kdevops@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH RFC 0/3] Run Ansible Lint Across Playbooks From: Daniel Gomez To: Luis Chamberlain , Chuck Lever Cc: kdevops@lists.linux.dev, Daniel Gomez References: <20250801-ansible-lint-v1-0-5a56a95ed8d5@samsung.com> Content-Language: en-US Organization: kernel.org In-Reply-To: <20250801-ansible-lint-v1-0-5a56a95ed8d5@samsung.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 01/08/2025 09.23, Daniel Gomez wrote: > In line with the motivation behind "[PATCH v2 0/9] kdevops: add support > for A/B testing" [1], this change runs ansible-lint across all playbooks > to enforce a more consistent and standardized formatting of Ansible > code. > > https://lore.kernel.org/kdevops/91f83d54-8375-4016-ab53-7a210437d39b@kernel.org/T/#u [1] > > This helps auto-fix several issues, but some rule violations still > require manual resolution. Below is a summary of the remaining issues: > > Rule Violation Summary > > 1 syntax-check profile:min tags:core,unskippable > 16 command-instead-of-module profile:min tags:command-shell,idiom > 2 deprecated-local-action profile:min tags:deprecations > 2 inline-env-var profile:min tags:command-shell,idiom > 6 jinja profile:min tags:formatting > 8 schema profile:min tags:core > 11 name profile:min tags:idiom > 1 name profile:min tags:idiom > 461 var-naming profile:min tags:idiom > 30 yaml profile:min tags:formatting,yaml > 1 yaml profile:min tags:formatting,yaml > 70 name profile:min tags:idiom > 3 latest profile:min tags:idempotency > 1 package-latest profile:min tags:idempotency > 119 risky-file-permissions profile:min tags:unpredictability > 10 risky-shell-pipe profile:min tags:command-shell > 45 ignore-errors profile:min tags:unpredictability > 162 no-changed-when profile:min tags:command-shell,idempotency > 2 fqcn profile:min tags:formatting > > Failed: 945 failure(s), 6 warning(s) on 562 files. > :0: DeprecationWarning: builtin type swigvarlink has no __module__ attribute > > Full log: > https://gist.github.com/dkruces/bc63122aa1145562157ced72cd3ed408 > > This structured output may serve as a useful input for generative AI in > future clean-up efforts. > > This has been tested in current kdevops CI (fstests) and manually with > nfstests workflow. > > An additional note is that not always ansible-lint will produce a valid > fix. I run into the following issue that affected bringup: > > - name: Check if the developer has a git config > delegate_to: localhost > - stat: > - path={{ dev_gitconfig_src }} > + ansible.builtin.stat: > + path: "{{" > + cmd: dev_gitconfig_src }} > run_once: true > register: dev_git_config_file > > The same pattern repeated in different tasks for the same file. So I > manually fix these and let Generative AI verify more files. > > Signed-off-by: Daniel Gomez > --- I've pushed the first 2 patches. 670303fe40e9 playbooks: ansible-lint: fix FileNotFoundError 609131cb3587 playbooks: fix include_tasks paths in kdc and krb5 role And agreed with Chuck to split the third into smaller parts for better bisectability, easier review, and clarity. The ansible-lint tool allows fixing issues using individual rule IDs or rule tags [1]. Link: https://ansible.readthedocs.io/projects/lint/autofix/#autofix [1]