ansible

概要

ansible-lintの基本的な使い方です。

インストール手順

pip install ansible-lint

ルールの一覧確認

ansible-lint -L

lintの実行

ansible-lint /path/to/*.yml

lintファイルの指定

ansible-lint /pat/to/*.yml -c /path/to/.ansible-lint

ansible-lintの設定ファイル例

下記例だとANSIBLE0002の空白チェックのみがエラーとなる。

parseable: true
quiet: false
use_default_rules: true
skip_list:
 - ANSIBLE0004
 - ANSIBLE0005
 - ANSIBLE0006
 - ANSIBLE0007
 - ANSIBLE0008
 - ANSIBLE0009
 - ANSIBLE0010
 - ANSIBLE0011
 - ANSIBLE0012
 - ANSIBLE0013
 - ANSIBLE0014
 - ANSIBLE0015
 - ANSIBLE0016
 - ANSIBLE0017
 - ANSIBLE0018
verbosity: 1

トップ   編集 凍結 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2022-06-30 (木) 01:40:11