第8章 Automation content navigator の設定
コンテンツ作成者は、開発環境に合わせるために、Automation content navigator を設定できます。
8.1. Automation content navigator 設定ファイルの作成 リンクのコピーリンクがクリップボードにコピーされました!
リンクのコピーリンクがクリップボードにコピーされました!
以下を使用して、デフォルトの Automation content navigator 設定を変更できます。
- コマンドライン
- 設定ファイル
- 環境変数
Automation content navigator は以下の順序で設定ファイルを確認し、最初の一致を使用します。
-
ANSIBLE_NAVIGATOR_CONFIG: 設定されている場合は、設定ファイルのパス環境変数です。 -
./ansible-navigator.<ext>: 現行プロジェクトディレクトリー内の設定ファイルです。ファイル名にドットはありません。 -
\~/.ansible-navigator.<ext>: ファイル名にドットが含まれるホームディレクトリーです。
Automation content navigator 設定ファイルを作成する場合は、以下を考慮してください。
-
設定ファイルは、
JSON形式またはYAML形式のいずれかを使用できます。 -
JSON形式では、拡張子を.jsonにする必要があります。 -
YAML形式では、拡張子を.ymlまたは.yamlにする必要があります。 - プロジェクトおよびホームディレクトリーにはそれぞれ設定ファイルを 1 つだけ使用できます。
- Automation content navigator が、いずれかのディレクトリーで複数の設定ファイルを見つけると、エラーが発生します。
以下の設定ファイル例を上記のパスのいずれかにコピーして、ansible-navigator 設定ファイルを開始できます。
---
ansible-navigator:
# ansible:
# config: /tmp/ansible.cfg
# cmdline: "--forks 15"
# inventories:
# - /tmp/test_inventory.yml
# playbook: /tmp/test_playbook.yml
# ansible-runner:
# artifact-dir: /tmp/test1
# rotate-artifacts-count: 10
# timeout: 300
# app: run
# collection-doc-cache-path: /tmp/cache.db
# color:
# enable: False
# osc4: False
# editor:
# command: vim_from_setting
# console: False
# documentation:
# plugin:
# name: shell
# type: become
# execution-environment:
# container-engine: podman
# enabled: False
# environment-variables:
# pass:
# - ONE
# - TWO
# - THREE
# set:
# KEY1: VALUE1
# KEY2: VALUE2
# KEY3: VALUE3
# image: test_image:latest
# pull-policy: never
# volume-mounts:
# - src: "/test1"
# dest: "/test1"
# label: "Z"
# help-config: True
# help-doc: True
# help-inventory: True
# help-playbook: False
# inventory-columns:
# - ansible_network_os
# - ansible_network_cli_ssh_type
# - ansible_connection
logging:
# append: False
level: critical
# file: /tmp/log.txt
# mode: stdout
# playbook-artifact:
# enable: True
# replay: /tmp/test_artifact.json
# save-as: /tmp/test_artifact.json
---
ansible-navigator:
# ansible:
# config: /tmp/ansible.cfg
# cmdline: "--forks 15"
# inventories:
# - /tmp/test_inventory.yml
# playbook: /tmp/test_playbook.yml
# ansible-runner:
# artifact-dir: /tmp/test1
# rotate-artifacts-count: 10
# timeout: 300
# app: run
# collection-doc-cache-path: /tmp/cache.db
# color:
# enable: False
# osc4: False
# editor:
# command: vim_from_setting
# console: False
# documentation:
# plugin:
# name: shell
# type: become
# execution-environment:
# container-engine: podman
# enabled: False
# environment-variables:
# pass:
# - ONE
# - TWO
# - THREE
# set:
# KEY1: VALUE1
# KEY2: VALUE2
# KEY3: VALUE3
# image: test_image:latest
# pull-policy: never
# volume-mounts:
# - src: "/test1"
# dest: "/test1"
# label: "Z"
# help-config: True
# help-doc: True
# help-inventory: True
# help-playbook: False
# inventory-columns:
# - ansible_network_os
# - ansible_network_cli_ssh_type
# - ansible_connection
logging:
# append: False
level: critical
# file: /tmp/log.txt
# mode: stdout
# playbook-artifact:
# enable: True
# replay: /tmp/test_artifact.json
# save-as: /tmp/test_artifact.json