第 8 章 Automation content navigator configuration settings
As a content creator, you can configure Automation content navigator to suit your development environment.
8.1. About Automation content navigator settings 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
You can alter the default Automation content navigator settings through:
- The command line
- Within a settings file
- As an environment variable
Automation content navigator checks for a settings file in the following order and uses the first match:
-
ANSIBLE_NAVIGATOR_CONFIG
- The settings file path environment variable if set. -
./ansible-navigator.<ext>
- The settings file within the current project directory, with no dot in the file name. -
~/.ansible-navigator.<ext>
- Your home directory, with a dot in the file name.
Consider the following when you create an Automation content navigator settings file:
-
The settings file can be in
JSON
orYAML
format. -
For settings in
JSON
format, the extension must be.json
. -
For settings in
YAML
format, the extension must be.yml
or.yaml
. - The project and home directories can only contain one settings file each.
- If Automation content navigator finds more than one settings file in either directory, it results in an error.
You can copy the example settings file below into one of those paths to start your ansible-navigator
settings file.
--- 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