nick_invision.required
必要なもの
変数が設定されているか、パスが存在するかを確認する基本的な役割です。これは、必要な変数やパスが実行されるタスクを待つのではなく、プレイブック内で最初に実行して早期に失敗するために意図されています。
要件
なし
役割の変数
デフォルトの変数は設定されていませんが、以下のいずれかが見つかると、指定されたアサーションが行われます。
# 設定されている場合、変数が定義されていて長さがゼロでないかをチェックします
required_vars
# 設定されている場合、ローカルでパスの存在をチェックします
required_local_paths
# 設定されている場合、各リモートでパスの存在をチェックします
required_remote_paths
依存関係
なし
例プレイブック
- name: 事前確認の検証
include_role:
name: nick_invision.required
vars:
required_vars:
- an_important_var
- another_important_var
- name: 事前確認の検証
include_role:
name: nick_invision.required
vars:
required_local_paths:
- ~/something/locally/important.txt
- something/locally/relatively/important.txt
- /something/locally/absolutely/important.txt
- name: 事前確認の検証
include_role:
name: nick_invision.required
vars:
required_remote_paths:
- ~/something/remote/important.txt
- something/remote/relatively/important.txt
- /something/remote/absolutely/important.txt
- name: 事前確認の検証
include_role:
name: nick_invision.required
vars:
required_vars:
- an_important_var
- another_important_var
required_local_paths:
- ~/something/locally/important.txt
- something/locally/relatively/important.txt
- /something/locally/absolutely/important.txt
required_remote_paths:
- ~/something/remote/important.txt
- something/remote/relatively/important.txt
- /something/remote/absolutely/important.txt
ライセンス
MIT
インストール
ansible-galaxy install nick_invision.required
ライセンス
Unknown
ダウンロード
255
所有者