Ansible Navigator Creator Guide

Red Hat Ansible Automation Platform 2.2

Ansible Creator 워크플로에서 Ansible Navigator 사용.

Red Hat Customer Content Services

초록

피드백 제공:
이 문서를 개선하거나 오류를 찾을 수 있는 제안이 있는 경우 문서 구성 요소를 사용하여 Ansible Automation Platform Jira 프로젝트에 문제를 생성하기 위해 에서 https://access.redhat.com 기술 지원에 문의하십시오.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 용어를 교체하기 위해 최선을 다하고 있습니다. 먼저 마스터(master), 슬레이브(slave), 블랙리스트(blacklist), 화이트리스트(whitelist) 등 네 가지 용어를 교체하고 있습니다. 이러한 변경 작업은 작업 범위가 크므로 향후 여러 릴리스에 걸쳐 점차 구현할 예정입니다. 자세한 내용은 CTO Chris Wright의 메시지를 참조하십시오.

1장. Ansible 콘텐츠 navigator 소개

콘텐츠 작성자는 Automation 콘텐츠 navigator를 사용하여 Red Hat Ansible Automation Platform과 호환되는 Ansible 플레이북, 컬렉션 및 역할을 개발할 수 있습니다. 다음 환경에서 Automation 콘텐츠 navigator를 사용하면 모두 원활하고 예측 가능한 결과를 얻을 수 있습니다.

  • 로컬 개발 머신
  • 자동화 실행 환경

자동화 콘텐츠 navigator는 또한 플레이북을 개발하고 문제 영역을 해결하는 데 사용할 수 있는 아티팩트 파일을 생성합니다.

1.1. Automation 콘텐츠 navigator에 사용

자동화 콘텐츠 navigator는 텍스트 기반 사용자 인터페이스를 사용하는 명령줄 콘텐츠 생성기 중심 도구입니다. Automation 콘텐츠 navigator를 사용하여 다음을 수행할 수 있습니다.

  • 작업 및 플레이북을 시작하고 조사합니다.
  • 저장된 완료된 플레이북 및 작업 실행 아티팩트를 JSON 형식으로 공유합니다.
  • 자동화 실행 환경을 탐색하고 인트로스펙션합니다.
  • 파일 기반 인벤토리를 찾습니다.
  • Ansible 모듈 문서를 렌더링하고 플레이북에서 사용할 수 있는 예제를 추출합니다.

자동화 실행 환경과 같은 컨테이너에서 ansible-playbook 과 같은 Ansible 코어의 일부인 Ansible 명령은 실행할 수 없습니다. 자동화 실행 환경과 호환되는 Ansible CLI 명령 세트가 포함된 Automation 콘텐츠 navigator를 사용합니다. 자동화 콘텐츠 navigator에는 텍스트 기반 사용자 인터페이스 내에서 더 자세한 출력이 포함되어 있습니다.

1.2. 자동화 콘텐츠 navigator 모드

자동화 콘텐츠 navigator는 두 가지 모드에서 작동합니다.

stdout 모드
명령줄에서 대부분의 기존 Ansible 명령 및 확장을 허용합니다.
텍스트 기반 사용자 인터페이스 모드
Ansible 명령에 대화형 텍스트 기반 인터페이스를 제공합니다. 이 모드를 사용하여 콘텐츠를 평가하고, 플레이북을 실행하고, 아티팩트 파일을 사용하여 실행한 후 플레이북의 문제를 해결합니다.

1.2.1. stdout 모드

Automation 콘텐츠 navigator와 함께 -m stdout 하위 명령을 사용하여 자동화 실행 환경 또는 로컬 개발 환경에서 ansible-playbook 과 같은 친숙한 Ansible 명령을 사용합니다. 빠른 작업을 위해 익숙한 명령을 사용할 수 있습니다.

자동화 콘텐츠 navigator는 이 모드에서도 광범위한 도움말을 제공합니다.

--help
ansible-navigator 명령 또는 ansible-navigator config --help 와 같은 하위 명령에서 액세스할 수 있습니다.
하위 명령 도움말
하위 명령에서 액세스할 수 있습니다(예: ansible-navigator config --help-config ). 이 도움말은 관련 Ansible 명령에서 지원되는 모든 매개변수의 세부 정보를 표시합니다.

1.2.2. 텍스트 기반 사용자 인터페이스 모드

텍스트 기반 사용자 인터페이스 모드는 자동화 실행 환경, 컬렉션, 플레이북 및 인벤토리와의 향상된 상호 작용을 제공합니다. 이 모드는 Visual Studio Code와 같은 IDE(통합 개발 환경)와 호환됩니다.

텍스트 기반 사용자 인터페이스 모드

이 모드에는 몇 가지 유용한 사용자 인터페이스 옵션이 포함되어 있습니다.

콜론 명령
:run 또는 :collections와 같은 콜론을 사용하여 모든 Automation 콘텐츠 navigator 명령에 액세스할 수 있습니다.
텍스트 기반 인터페이스 탐색
화면은 페이지 위 또는 아래로 스크롤, 이전 화면으로 이스케이프 또는 액세스 :help 를 보여줍니다.
줄 번호별 출력
표시된 출력의 모든 줄 번호 앞에 콜론(예 : :12) 을 사용하여 액세스할 수 있습니다.
색상 코드 출력
색상이 활성화된 상태에서 Automation 콘텐츠 navigator는 더 이상 사용되지 않는 모듈과 같은 항목을 빨간색으로 표시합니다.
페이지 및 스크롤
각 Automation 콘텐츠 navigator 화면 하단에 표시되는 옵션을 사용하여 위 또는 아래로 스크롤하거나 이스케이프할 수 있습니다.

Automation 콘텐츠 navigator가 실행된 후에는 모드 간에 전환할 수 없습니다.

이 문서에서는 대부분의 프로시저에 대해 텍스트 기반 사용자 인터페이스 모드를 사용합니다.

1.3. 자동화 콘텐츠 navigator 명령

Automation 콘텐츠 navigator 명령은 -m stdout 모드에서 친숙한 Ansible CLI 명령을 실행합니다. 관련 Ansible CLI 명령의 모든 하위 명령 및 옵션을 사용할 수 있습니다. 자세한 내용은 ansible-navigator --help 를 사용합니다.

표 1.1. 자동화 콘텐츠 navigator 명령

명령설명CLI 예

컬렉션

사용 가능한 컬렉션 살펴보기

ansible-navigator 컬렉션 --help

config

현재 ansible 구성 살펴보기

ansible-navigator config --help

doc

모듈 또는 플러그인에 대한 문서 검토

Ansible-navigator doc --help

이미지

실행 환경 이미지 살펴보기

ansible-navigator images --help

인벤토리

인벤토리 살펴보기

ansible-navigator inventory --help

Replay

플레이북 아티팩트를 사용하여 이전 실행 살펴보기

Ansible-navigator replay --help

run

Playbook 실행

ansible-navigator run --help

welcome

시작 페이지에서 시작

ansible-navigator welcome --help

1.4. Ansible 및 Automation 콘텐츠 navigator 명령 간의 관계

Automation 콘텐츠 navigator 명령은 -m stdout 모드에서 친숙한 Ansible CLI 명령을 실행합니다. 관련 Ansible CLI 명령에서 사용할 수 있는 모든 하위 명령 및 옵션을 사용할 수 있습니다. 자세한 내용은 ansible-navigator --help 를 사용합니다.

표 1.2. Automation 콘텐츠 navigator 및 Ansible CLI 명령 비교

Ansible navigator 명령Ansible CLI 명령

Ansible-navigator 컬렉션

ansible-galaxy 컬렉션

Ansible-navigator 구성

ansible-config

Ansible-navigator doc

ansible-doc

Ansible-navigator 인벤토리

ansible-inventory

Ansible-navigator 실행

ansible-playbook

2장. RHEL에 Automation 콘텐츠 navigator 설치

컨텐츠 작성자는 RHEL(Red Hat Enterprise Linux) 8 이상에 Automation 콘텐츠 navigator를 설치할 수 있습니다.

2.1. RPM에서 RHEL에 Automation 콘텐츠 navigator 설치

RPM에서 RHEL(Red Hat Enterprise Linux)에 Automation 콘텐츠 navigator를 설치할 수 있습니다.

사전 요구 사항

  • RHEL 8 이상이 설치되어 있어야 합니다.
  • Red Hat Subscription Manager에 시스템을 등록하셨습니다.
참고

현재 Red Hat Ansible Automation Platform 환경과 일치하는 navigator만 설치해야 합니다.

절차

  1. Red Hat Ansible Automation Platform SKU 연결:

    $ subscription-manager attach --pool=<sku-pool-id>
  2. 다음 명령을 사용하여 Automation 콘텐츠 navigator를 설치합니다.

    # dnf install --enablerepo=ansible-automation-platform-2.2-for-rhel-8-x86_64-rpms ansible-navigator

검증

  • Automation 콘텐츠 navigator 설치를 확인합니다.

    $ ansible-navigator --help

다음 예제에서는 설치를 성공적으로 수행하는 방법을 보여줍니다.

자동화 콘텐츠 navigator 성공적인 설치

3장. Automation 콘텐츠 navigator를 사용하여 자동화 실행 환경 검토

콘텐츠 개발자는 Automation 콘텐츠 navigator를 사용하여 자동화 실행 환경을 검토하고 자동화 실행 환경에 포함된 패키지 및 컬렉션을 표시할 수 있습니다. 자동화 콘텐츠 navigator는 플레이북을 실행하여 결과를 추출하고 표시합니다.

3.1. Automation 콘텐츠 navigator에서 Automation 실행 환경 검토

Automation 콘텐츠 navigator 텍스트 기반 사용자 인터페이스를 사용하여 Automation 실행 환경을 검토할 수 있습니다.

사전 요구 사항

  • 자동화 실행 환경

절차

  1. Automation 콘텐츠 navigator 구성에 포함된 자동화 실행 환경을 검토합니다.

    $ ansible-navigator images
    자동화 실행 환경 목록
  2. 자세한 내용은 제공할 자동화 실행 환경 수를 입력합니다.

    자동화 실행 환경 세부 정보

    설치된 각 자동화 실행 환경의 패키지 및 버전과 모든 포함된 컬렉션을 검토할 수 있습니다.

  3. 선택 사항: 사용하려는 자동화 실행 환경을 전달합니다. 이는 기본이 되며 Automation 콘텐츠 navigator에서 사용하는 자동화 실행 환경입니다.

    $ ansible-navigator images --eei  registry.example.com/example-enterprise-ee:latest

검증

  • 자동화 실행 환경 출력을 검토합니다.

    자동화 실행 환경 출력

4장. Automation 콘텐츠 navigator를 사용하여 인벤토리 검토

콘텐츠 작성자는 Automation 콘텐츠 navigator를 사용하여 Ansible 인벤토리를 검토하고 그룹 및 호스트를 대화형으로 제공할 수 있습니다.

4.1. Automation 콘텐츠 navigator에서 인벤토리 검토

자세한 내용은 Automation 콘텐츠 navigator 텍스트 기반 사용자 인터페이스를 대화형 모드에서 사용하여 Ansible 인벤토리를 검토하고 그룹 및 호스트로 전달할 수 있습니다.

사전 요구 사항

  • 유효한 인벤토리 파일 또는 인벤토리 플러그인.

절차

  1. Automation 콘텐츠 navigator를 시작합니다.

    $ ansible-navigator

    선택 사항: 명령줄에서 ansible-navigator 인벤토리 -i simple_inventory.yml 을 입력하여 인벤토리를 확인합니다.

  2. 인벤토리를 검토합니다.

     :inventory -i simple_inventory.yml
    
       TITLE            DESCRIPTION
    0│Browse groups    Explore each inventory group and group members members
    1│Browse hosts     Explore the inventory with a list of all hosts
  3. 0 을 입력하여 그룹을 탐색합니다.

      NAME               TAXONOMY                      TYPE
    0│general            all                           group
    1│nodes              all                           group
    2│ungrouped          all                           group

    TAXONOMY 필드는 선택한 그룹 또는 노드가 속하는 그룹의 계층을 자세히 설명합니다.

  4. 전달하려는 그룹에 해당하는 번호를 입력합니다.

      NAME              TAXONOMY                        TYPE
    0│node-0            all▸nodes                       host
    1│node-1            all▸nodes                       host
    2│node-2            all▸nodes                       host
  5. 전달하려는 호스트에 해당하는 숫자를 입력하거나 9보다 큰 숫자의 경우 :<number >를 입력합니다.

    [node-1]
    0│---
    1│ansible_host: node-1.example.com
    2│inventory_hostname: node-1

검증

  • 인벤토리 출력을 검토합니다.

      TITLE            DESCRIPTION
    0│Browse groups   Explore each inventory group and group members members
    1│Browse hosts    Explore the inventory with a list of all hosts

5장. Automation 콘텐츠 navigator를 사용하여 컬렉션 검색

콘텐츠 작성자는 Automation 콘텐츠 navigator를 사용하여 Ansible 컬렉션을 찾고 로컬 또는 Automation 실행 환경 내에서 개발한 각 컬렉션을 대화형으로 제공할 수 있습니다.

5.1. 자동화 콘텐츠 navigator 컬렉션 표시

자동화 콘텐츠 navigator는 각 컬렉션에 대한 다음 세부 정보를 사용하여 컬렉션에 대한 정보를 표시합니다.

SHADOWED
컬렉션의 추가 사본이 검색 순서에 더 높음을 나타내며 플레이북이 해당 컬렉션을 선호하는 것을 나타냅니다.
유형
컬렉션이 자동화 실행 환경 또는 에 bind_mount 로 마운트된 볼륨 내에 포함되어 있는지 여부를 표시합니다.
PATH
collection TYPE 필드를 기반으로 자동화 실행 환경 또는 로컬 파일 시스템 내의 컬렉션 위치를 반영합니다.
자동화 콘텐츠 navigator 컬렉션 표시

5.2. Automation 콘텐츠 navigator에서 컬렉션 검색

Automation 콘텐츠 navigator 텍스트 기반 사용자 인터페이스를 대화형 모드에서 사용하여 Ansible 컬렉션을 찾고 각 컬렉션을 탐색할 수 있습니다. 자동화 콘텐츠 navigator는 현재 프로젝트 디렉터리 내의 컬렉션과 자동화 실행 환경에서 사용 가능한 컬렉션을 보여줍니다.

사전 요구 사항

  • 로컬에 액세스할 수 있는 컬렉션 또는 설치된 자동화 실행 환경.

절차

  1. Automation 콘텐츠 navigator 시작

    $ ansible-navigator
  2. 컬렉션을 찾습니다. 또는 ansible-navigator 컬렉션을 입력하여 컬렉션을 직접 검색할 수 있습니다.

    $ :collections
    Automation 콘텐츠 navigator에 표시된 Ansible 컬렉션 목록
  3. 검색할 컬렉션의 수를 입력합니다.Type the number of the collection you want to explore.

    :4
    Automation 콘텐츠 navigator에 표시된 컬렉션
  4. 제공하려는 모듈에 해당하는 번호를 입력합니다.

    ANSIBLE.UTILS.IP_ADDRESS: Test if something in an IP address
     0│---
     1│additional_information: {}
     2│collection_info:
     3│  authors:
     4│  - Ansible Community
     5│  dependencies: {}
     6│  description: Ansible Collection with utilities to ease the management, manipulation,
     7│    and validation of data within a playbook
     8│  documentation: null
     9│  homepage: null
    10│  issues: null
    11│  license: []
    12│  license_file: LICENSE
    13│  name: ansible.utils
    14│  namespace: ansible
    15│  path:/usr/share/ansible/collections/ansible_collections/ansible/utils/
    16│  readme: README.md
    <... output truncated...>
  5. 선택 사항: 이 모듈에 대한 문서 예제로 이동합니다.

    :{{ examples }}
    
    0│
    1│
    2│#### Simple examples
    3│
    4│- name: Check if 10.1.1.1 is a valid IP address
    5│  ansible.builtin.set_fact:
    6│    data: "{{ '10.1.1.1' is ansible.utils.ip_address }}"
    7│
    8│# TASK [Check if 10.1.1.1 is a valid IP address] *********************
    9│# ok: [localhost] => {
    10│#     "ansible_facts": {
    11│#         "data": true
    12│#     },
    13│#     "changed": false
    14│# }
    15│
  6. 선택 사항: 편집기에서 예제를 열어 플레이북에 복사합니다.

    :open
    편집 툴에 표시된 문서 예

검증

  • 컬렉션 목록을 찾습니다.

    컬렉션 목록

5.3. Automation 콘텐츠 navigator에서 문서 검토

대화형 모드에서 Automation 콘텐츠 navigator 텍스트 기반 사용자 인터페이스를 사용하여 컬렉션 및 플러그인에 대한 Ansible 문서를 검토할 수 있습니다. 자동화 콘텐츠 navigator는 현재 프로젝트 디렉터리 내의 컬렉션과 자동화 실행 환경에서 사용 가능한 컬렉션을 보여줍니다.

사전 요구 사항

  • 로컬에 액세스할 수 있는 컬렉션 또는 설치된 자동화 실행 환경.

절차

  1. Automation 콘텐츠 navigator 시작

    $ ansible-navigator
  2. 관심 있는 모듈을 검토합니다. 또는 ansible-navigator doc 를 입력하여 문서에 액세스할 수 있습니다.

    :doc ansible.utils.ip_address
    ANSIBLE.UTILS.IP_ADDRESS: Test if something in an IP address
     0│---
     1│additional_information: {}
     2│collection_info:
     3│  authors:
     4│  - Ansible Community
     5│  dependencies: {}
     6│  description: Ansible Collection with utilities to ease the management, manipulation,
     7│    and validation of data within a playbook
     8│  documentation: null
     9│  homepage: null
    10│  issues: null
    11│  license: []
    12│  license_file: LICENSE
    13│  name: ansible.utils
    14│  namespace: ansible
    15│  path:/usr/share/ansible/collections/ansible_collections/ansible/utils/
    16│  readme: README.md
    <... output truncated...>
  3. 이 모듈에 대한 문서 예제로 건너뜁니다.

    :{{ examples }}
    
    0│
    1│
    2│#### Simple examples
    3│
    4│- name: Check if 10.1.1.1 is a valid IP address
    5│  ansible.builtin.set_fact:
    6│    data: "{{ '10.1.1.1' is ansible.utils.ip_address }}"
    7│
    8│# TASK [Check if 10.1.1.1 is a valid IP address] *********************
    9│# ok: [localhost] => {
    10│#     "ansible_facts": {
    11│#         "data": true
    12│#     },
    13│#     "changed": false
    14│# }
    15│
  4. 선택 사항: 편집기에서 예제를 열어 플레이북에 복사합니다.

    :open
    편집기의 문서 예

    편집기 설정 방법에 대한 자세한 내용은 자동화 콘텐츠 navigator 일반 설정을 참조하십시오.

6장. Automation 콘텐츠 navigator를 사용하여 Ansible 플레이북 실행

콘텐츠 작성자는 Automation 콘텐츠 navigator를 사용하여 Ansible 플레이북을 실행하고 각 플레이 및 작업의 결과를 대화형으로 제공하여 플레이북을 확인하거나 문제를 해결할 수 있습니다. 실행 환경 내에서 Ansible 플레이북을 실행하여 문제를 비교하고 해결할 수도 있습니다.

6.1. Automation 콘텐츠 navigator에서 플레이북 실행

Automation 콘텐츠 navigator 텍스트 기반 사용자 인터페이스를 사용하여 Ansible 플레이북을 실행하여 작업 실행을 따르고 각 작업의 결과를 전달할 수 있습니다.

사전 요구 사항

  • 플레이북.
  • localhost 또는 인벤토리 플러그인을 사용하지 않는 경우 유효한 인벤토리 파일입니다.

절차

  1. Automation 콘텐츠 navigator 시작

    $ ansible-navigator
  2. 플레이북을 실행합니다.

    $ :run
  3. 선택 사항: ansible-navigator를 입력합니다. simple-playbook.yml -i inventory.yml 을 실행하여 플레이북을 실행합니다.
  4. 인벤토리 및 기타 명령줄 매개 변수를 확인하거나 추가합니다.

    INVENTORY OR PLAYBOOK NOT FOUND, PLEASE CONFIRM THE FOLLOWING
    ─────────────────────────────────────────────────────────────────────────
       Path to playbook: /home/ansible-navigator_demo/simple_playbook.yml
       Inventory source: /home/ansible-navigator-demo/inventory.yml
      Additional command line parameters: Please provide a value (optional)
    ──────────────────────────────────────────────────────────────────────────
                                                               Submit Cancel
  5. 탭을 선택하여 제출하고 Enter를 누릅니다. 작업이 실행되는 것을 확인할 수 있습니다.

    플레이북 작업 실행
  6. 플레이 옆에 있는 숫자를 입력하여 플레이 결과에 들어가거나 9 위 숫자에 대해 :<number& gt;를 입력합니다.

    task list

    Automation 콘텐츠 navigator에 대해 색상이 활성화된 경우 실패한 작업이 빨간색으로 표시됩니다.

  7. 작업 옆에 있는 숫자를 입력하여 작업 결과를 검토하거나 9 위 숫자의 경우 :<number >를 입력합니다.

    실패한 작업 결과
  8. 선택 사항: type :doc 문제를 해결하기 위해 작업에 사용된 모듈 또는 플러그인에 대한 설명서를 가져옵니다.

    ANSIBLE.BUILTIN.PACKAGE_FACTS (MODULE)
      0│---
      1│doc:
      2│  author:
      3│  - Matthew Jones (@matburt)
      4│  - Brian Coca (@bcoca)
      5│  - Adam Miller (@maxamillion)
      6│  collection: ansible.builtin
      7│  description:
      8│  - Return information about installed packages as facts.
    <... output omitted ...>
     11│  module: package_facts
     12│  notes:
     13│  - Supports C(check_mode).
     14│  options:
     15│    manager:
     16│      choices:
     17│      - auto
     18│      - rpm
     19│      - apt
     20│      - portage
     21│      - pkg
     22│      - pacman
    
    <... output truncated ...>

6.2. 플레이북 검토 결과 Automation 콘텐츠 navigator 아티팩트 파일을 사용하여

자동화 콘텐츠 navigator는 JSON 아티팩트 파일에 플레이북 실행 결과를 저장합니다. 이 파일을 사용하여 플레이북 결과를 다른 사용자와 공유하거나, 보안 또는 규정 준수 이유로 저장하고 나중에 검토 및 해결할 수 있습니다. 플레이북 실행을 검토하려면 아티팩트 파일만 있으면 됩니다. 플레이북 자체 또는 인벤토리 액세스에 액세스할 필요가 없습니다.

사전 요구 사항

  • 플레이북 실행의 Automation 콘텐츠 navigator 아티팩트 JSON 파일

절차

  • 아티팩트 파일을 사용하여 Automation 콘텐츠 navigator를 시작합니다.

    $ ansible-navigator replay simple_playbook_artifact.json
    1. 플레이북이 실행 중일 때 일치하는 플레이북 결과를 검토합니다.

      플레이북 결과

플레이북을 실행한 후와 같이 결과를 검토하기 위해 각 플레이 및 작업 옆에 있는 번호를 입력할 수 있습니다.

7장. Automation 콘텐츠 navigator를 사용하여 Ansible 구성 검토

콘텐츠 작성자는 Automation 콘텐츠 navigator를 사용하여 Ansible 구성을 검토하고 설정을 대화형으로 검색할 수 있습니다.

7.1. Automation 콘텐츠 navigator에서 Ansible 구성 검토

대화형 모드에서 Automation 콘텐츠 navigator 텍스트 기반 사용자 인터페이스를 사용하여 Ansible 구성을 검토하고 설정을 탐색할 수 있습니다. 자동화 콘텐츠 navigator는 액세스 가능한 Ansible 구성 파일에서 결과를 가져오거나 구성 파일이 없는 경우 기본값을 반환합니다.

사전 요구 사항

절차

  1. Automation 콘텐츠 navigator 시작

    $ ansible-navigator

    선택 사항: 명령줄에서 ansible-navigator 구성 을 입력하여 Ansible 구성 설정에 액세스합니다.

  2. Ansible 구성을 검토합니다.

     :config
    Ansible 구성

    일부 값은 자동화 실행 환경이 작동하는 데 필요한 자동화 실행 환경 내의 설정을 반영합니다. 이러한 설정은 Ansible 구성 파일에서 설정할 수 없는 기본 설정이 아닙니다.

  3. 전달하려는 설정에 해당하는 숫자를 입력하거나 9보다 큰 숫자의 경우 :<number >를 입력합니다.

    ANSIBLE COW ACCEPTLIST (current: ['bud-frogs', 'bunny', 'cheese']) (default:
     0│---
     1│current:
     2│- bud-frogs
     3│- bunny
     4│- cheese
     5│default:
     6│- bud-frogs
     7│- bunny
     8│- cheese
     9│- daemon

출력에는 현재 설정 과 기본값이 표시됩니다. 이 예제의 소스는 자동화 실행 환경에서 설정이 제공되므로 env 입니다.

검증

  • 구성 출력을 검토합니다.

    구성 출력

8장. 자동화 콘텐츠 navigator 구성 설정

콘텐츠 작성자는 개발 환경에 맞게 Automation 콘텐츠 navigator를 구성할 수 있습니다.

8.1. Automation 콘텐츠 navigator 설정 파일 생성

다음을 통해 기본 Automation 콘텐츠 navigator 설정을 변경할 수 있습니다.

  • 명령줄
  • 설정 파일
  • 환경 변수

자동화 콘텐츠 navigator는 다음 순서로 설정 파일을 확인하고 첫 번째 일치 항목을 사용합니다.

  • ANSIBLE_NAVIGATOR_CONFIG - 설정된 경우 설정 파일 경로 환경 변수입니다.
  • ./Ansible-navigator.<ext> - 현재 프로젝트 디렉터리 내의 설정 파일이며 파일 이름에 점이 없습니다.
  • \~/.Ansible-navigator.<ext> - 파일 이름에 점이 있는 홈 디렉터리입니다.

Automation 콘텐츠 navigator 설정 파일을 만들 때 다음을 고려하십시오.

  • 설정 파일은 JSON 또는 YAML 형식일 수 있습니다.
  • JSON 형식의 설정의 경우 확장은 .json 여야 합니다.
  • YAML 형식의 설정의 경우 확장은 .yml 또는 .yaml 여야 합니다.
  • 프로젝트 및 홈 디렉터리에는 각각 하나의 설정 파일만 포함될 수 있습니다.
  • Automation 콘텐츠 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

8.2. Automation Content navigator 일반 설정

다음 표에서는 각 일반 매개 변수 및 Automation 콘텐츠 navigator에 대한 옵션을 설명합니다.

표 8.1. 자동화 콘텐츠 navigator 일반 매개 변수 설정

매개변수설명옵션 설정

ansible-runner-artifact-dir

ansible-runner에서 생성한 아티팩트를 저장할 디렉터리 경로입니다.

기본값: 기본값 없음

CLI: --rad 또는 --ansible-runner-artifact-dir

ENV: ANSIBLE_NAVIGATOR_ANSIBLE_RUNNER_ARTIFACT_DIR

설정 파일:

ansible-navigator:
  ansible-runner:
    artifact-dir:

ansible-runner-rotate-artifacts-count

마지막 n 실행을 위해 ansible-runner 아티팩트 디렉터리를 유지합니다. 0으로 설정하면 아티팩트 디렉터리가 삭제되지 않습니다.

기본값: 기본값 없음

CLI: --rac 또는 --ansible-runner-rotate-artifacts-count

ENV: ANSIBLE_NAVIGATOR_ANSIBLE_RUNNER_ROTATE_ARTIFACTS_COUNT

설정 파일:

ansible-navigator:
  ansible-runner:
    rotate-artifacts-count:

ansible-runner-timeout

ansible-runner force가 실행을 중지한 후의 시간 초과 값입니다.

기본값: 기본값 없음

CLI: --rt 또는 --ansible-runner-timeout

ENV: ANSIBLE_NAVIGATOR_ANSIBLE_RUNNER_TIMEOUT

설정 파일:

ansible-navigator:
  ansible-runner:
    timeout:

app

Automation 콘텐츠 navigator에 대한 진입점입니다.

선택 사항: 컬렉션,config,doc,이미지,인벤토리,재생,실행 또는 시작

기본값: welcome

CLI 예: ansible-navigator 컬렉션

ENV: ANSIBLE_NAVIGATOR_APP

설정 파일:

ansible-navigator:
  app:

cmdline

해당 명령에 전달된 추가 매개변수입니다.

기본값: 기본값 없음

CLI: Locational

ENV: ANSIBLE_NAVIGATOR_CMDLINE

설정 파일:

ansible-navigator:
  ansible:
    cmdline:

collection-doc-cache-path

컬렉션 문서 캐시의 경로입니다.

Default: $HOME/.cache/ansible-navigator/collection_doc_cache.db

CLI: --cdcp 또는 --collection-doc-cache-path

ENV: ANSIBLE_NAVIGATOR_COLLECTION_DOC_CACHE_PATH

설정 파일:

ansible-navigator:
  collection-doc-cache-path:

container-engine

컨테이너 엔진을 지정합니다(자동=podman 다음 docker).

선택 사항: auto,podman 또는 docker

기본값: auto

CLI: --ce 또는 --container-engine

ENV: ANSIBLE_NAVIGATOR_CONTAINER_ENGINE

설정 파일:

ansible-navigator:
  execution-environment:
    container-engine:

display-color

디스플레이에서 색상을 사용할 수 있습니다.

선택 사항: True 또는 False

기본값: True

CLI: --dc 또는 --display-color

ENV: NO_COLOR

설정 파일:

ansible-navigator:
  color:
    enable:

editor-command

Automation 콘텐츠 navigator에서 사용하는 편집기를 지정합니다.

기본값: * vi +{line_number} {filename}

CLI: --ecmd 또는 --editor-command

ENV: ANSIBLE_NAVIGATOR_EDITOR_COMMAND

설정 파일:

ansible-navigator:
  editor:
    command:

editor-console

편집기가 콘솔 기반인지 지정합니다.

선택 사항: True 또는 False

기본값: True

CLI: --econ 또는 --editor-console

ENV: ANSIBLE_NAVIGATOR_EDITOR_CONSOLE

설정 파일:

ansible-navigator:
  editor:
    console:

execution-environment

자동화 실행 환경 사용을 활성화 또는 비활성화합니다.

선택 사항: True 또는 False

기본값: True

CLI: --ee 또는 --execution-environment

ENV:* ANSIBLE_NAVIGATOR_EXECUTION_ENVIRONMENT

설정 파일:

ansible-navigator:
  execution-environment:
    enabled:

execution-environment-image

자동화 실행 환경 이미지의 이름을 지정합니다.

기본값: quay.io/ansible/ansible-runner:devel

CLI: --eei 또는 --execution-environment-image

ENV: ANSIBLE_NAVIGATOR_EXECUTION_ENVIRONMENT_IMAGE

설정 파일:

ansible-navigator:
  execution-environment:
    image:

execution-environment-volume-mounts

자동화 실행 환경 내에서 바인딩 마운트할 볼륨을 지정합니다(--eev /home/user/test:/home/user/test:Z).

기본값: 기본값 없음

CLI: --eev 또는 --execution-environment-volume-mounts

ENV: ANSIBLE_NAVIGATOR_EXECUTION_ENVIRONMENT_VOLUME_MOUNTS

설정 파일:

ansible-navigator:
  execution-environment:
    volume-mounts:

log-append

로그 메시지가 기존 로그 파일에 추가되어야 하는지 지정하십시오. 그렇지 않으면 세션별로 새 로그 파일이 생성됩니다.

선택 사항: True 또는 False

기본값: True

CLI: --la 또는 --log-append

ENV: ANSIBLE_NAVIGATOR_LOG_APPEND

설정 파일:

ansible-navigator:
  logging:
    append:

log-file

Automation 콘텐츠 navigator 로그 파일의 전체 경로를 지정합니다.

기본값: $PWD/ansible-navigator.log

CLI: --lf 또는 --log-file

ENV: ANSIBLE_NAVIGATOR_LOG_FILE

설정 파일:

ansible-navigator:
  logging:
    file:

log-level

Automation 콘텐츠 navigator 로그 수준을 지정합니다.

선택 사항: 디버그,정보,경고,오류 또는 심각

기본값: warning

CLI: --ll 또는 --log-level

ENV: ANSIBLE_NAVIGATOR_LOG_LEVEL

설정 파일:

ansible-navigator:
  logging:
    level:

mode

user-interface 모드를 지정합니다.

선택 사항: stdout 또는 대화형

기본값: interactive

CLI: -m 또는 --mode

ENV: ANSIBLE_NAVIGATOR_MODE

설정 파일:

ansible-navigator:
  mode:

osc4

OSC 4에서 터미널 색상 변경 지원을 활성화하거나 비활성화합니다.

선택 사항: True 또는 False

기본값: True

CLI: --osc4 또는 --osc4

ENV: ANSIBLE_NAVIGATOR_OSC4

설정 파일:

ansible-navigator:
  color:
    osc4:

pass-environment-variable

자동화 실행 환경 내에서 전달할 종료 환경 변수를 지정합니다(--penv MY_VAR).

기본값: 기본값 없음

CLI: --penv 또는 --pass-environment-ECDHE

ENV: ANSIBLE_NAVIGATOR_PASS_ENVIRONMENT_VARIABLES

설정 파일:

ansible-navigator:
  execution-environment:
    environment-variables:
      pass:

pull-policy

이미지 가져오기 정책을 지정합니다.

Always - 항상 이미지를 가져옵니다.

누락 - 로컬로 사용할 수 없는 경우 Pull

never - 이미지를 가져오지 않음

tag - 이미지 태그가 latest 인 경우 항상 이미지를 가져오는 경우 로컬에서 사용할 수 없는 경우 가져옵니다.

선택 사항: 항상,누락 됨,never 또는 tag

기본값: 태그

CLI: --pp 또는 --pull-policy

ENV: ANSIBLE_NAVIGATOR_PULL_POLICY

설정 파일:

ansible-navigator:
  execution-environment:
    pull-policy:

set-environment-variable

자동화 실행 환경 내에서 설정할 환경 변수와 값 지정 (--senv MY_VAR=42)

기본값: 기본값 없음

CLI: --senv 또는 --set-environment-ECDHE

ENV: ANSIBLE_NAVIGATOR_SET_ENVIRONMENT_VARIABLES

설정 파일:

ansible-navigator:
  execution-environment:
    environment-variables:
      set:

8.3. 자동화 콘텐츠 navigator config 하위 명령 설정

다음 표에서는 각 매개변수에 대해 설명하고 Automation 콘텐츠 navigator config 하위 명령에 대한 옵션을 설정합니다.

표 8.2. 자동화 콘텐츠 navigator config 하위 명령 매개 변수 설정

매개변수설명옵션 설정

config

Ansible 구성 파일의 경로를 지정합니다.

기본값: 기본값 없음

CLI: -c 또는 --config

ENV: ANSIBLE_CONFIG

설정 파일:

ansible-navigator:
  ansible:
    config:

help-config

stdout 모드에서 ansible-config 명령에 대한 도움말 옵션입니다.

선택 사항:* True 또는 False

기본값: False

CLI: --hc 또는 --help-config

ENV: ANSIBLE_NAVIGATOR_HELP_CONFIG

설정 파일:

ansible-navigator:
  help-config:

8.4. 자동화 콘텐츠 navigator doc 하위 명령 설정

다음 표에서는 각 매개 변수 및 Automation 콘텐츠 navigator doc 하위 명령에 대한 옵션을 설명합니다.

표 8.3. 자동화 콘텐츠 navigator doc 하위 명령 매개 변수 설정

매개변수설명옵션 설정

help-doc

stdout 모드에서 ansible-doc 명령에 대한 도움말 옵션입니다.

선택 사항: True 또는 False

기본값: False

CLI: --hd 또는 --help-doc

ENV: ANSIBLE_NAVIGATOR_HELP_DOC

설정 파일:

ansible-navigator:
  help-doc:

plugin-name

플러그인 이름을 지정합니다.

기본값: 기본값 없음

CLI: Locational

ENV: ANSIBLE_NAVIGATOR_PLUGIN_NAME

설정 파일:

ansible-navigator:
  documentation:
    plugin:
      name:

plugin-type

플러그인 유형을 지정합니다.

choices: become,cache,callback,cliconf,connection,httpapi,inventory,lookup,module,netconf,shell,strategy, or vars

기본값: module

CLI: -t 또는 ----type

ENV: ANSIBLE_NAVIGATOR_PLUGIN_TYPE

설정 파일:

ansible-navigator:
  documentation:
    plugin:
      type:

8.5. 자동화 콘텐츠 navigator 인벤토리 하위 명령 설정

다음 표에서는 각 매개 변수 및 Automation 콘텐츠 navigator inventory 하위 명령에 대한 옵션을 설명합니다.

표 8.4. 자동화 콘텐츠 navigator 인벤토리 하위 명령 매개 변수 설정

매개변수설명옵션 설정

help-inventory

stdout 모드에서 ansible-inventory 명령에 대한 도움말 옵션입니다.

선택 사항: True 또는 False

기본값: False

CLI: --hi 또는 --help-inventory

ENV: ANSIBLE_NAVIGATOR_INVENTORY_DOC

설정 파일:

ansible-navigator:
  help-inventory:

인벤토리

인벤토리 파일 경로 또는 쉼표로 구분된 호스트 목록을 지정합니다.

기본값: 기본값 없음

CLI: --i 또는 --inventory

ENV: ANSIBLE_NAVIGATOR_INVENTORIES

설정 파일:

ansible-navigator:
  inventories:

inventory-column

인벤토리 보기에 표시할 호스트 특성을 지정합니다.

기본값: 기본값 없음

CLI: --ic 또는 --inventory-column

ENV:* ANSIBLE_NAVIGATOR_INVENTORY_COLUMNS설정 파일:

ansible-navigator:
  inventory-columns:

8.6. 자동화 콘텐츠 navigator replay 하위 명령 설정

다음 표에서는 각 매개변수에 대해 설명하고 Automation 콘텐츠 navigator replay 하위 명령에 대한 옵션을 설정합니다.

표 8.5. 자동화 콘텐츠 navigator replay 하위 명령 매개 변수 설정

매개변수설명옵션 설정

playbook-artifact-replay

재생할 플레이북 아티팩트의 경로를 지정합니다.

기본값: 기본값 없음

CLI: Locational

ENV: ANSIBLE_NAVIGATOR_PLAYBOOK_ARTIFACT_REPLAY

설정 파일:

ansible-navigator:
  playbook-artifact:
    replay:

8.7. 자동화 콘텐츠 navigator 실행 하위 명령 설정

다음 표에서는 각 매개 변수 및 Automation 콘텐츠 navigator run 하위 명령에 대한 옵션을 설명합니다.

표 8.6. 자동화 콘텐츠 navigator 에서 하위 명령 매개 변수 설정 실행

매개변수설명옵션 설정

playbook-artifact-replay

재생할 플레이북 아티팩트의 경로를 지정합니다.

기본값: 기본값 없음

CLI: Locational

ENV: ANSIBLE_NAVIGATOR_PLAYBOOK_ARTIFACT_REPLAY

설정 파일:

ansible-navigator:
  playbook-artifact:
    replay:

help-playbook

stdout 모드에서 ansible-playbook 명령에 대한 도움말 옵션입니다.

선택 사항: True 또는 False

기본값: False

CLI: --hp 또는 --help-playbook

ENV: ANSIBLE_NAVIGATOR_HELP_PLAYBOOK

설정 파일:

ansible-navigator:
  help-playbook:

인벤토리

인벤토리 파일 경로 또는 쉼표로 구분된 호스트 목록을 지정합니다.

기본값: 기본값 없음

CLI: --i 또는 --inventory

ENV: ANSIBLE_NAVIGATOR_INVENTORIES

설정 파일:

ansible-navigator:
  inventories:

inventory-column

인벤토리 보기에 표시할 호스트 특성을 지정합니다.

기본값: 기본값 없음

CLI: --ic 또는 --inventory-column

ENV:* ANSIBLE_NAVIGATOR_INVENTORY_COLUMNS설정 파일:

ansible-navigator:
  inventory-columns:

playbook

플레이북 이름을 지정합니다.

기본값: 기본값 없음

CLI: Locational

ENV: ANSIBLE_NAVIGATOR_PLAYBOOK

설정 파일:*

ansible-navigator:
  ansible:
    playbook:

playbook-artifact-enable

완료된 플레이북의 아티팩트 생성을 활성화하거나 비활성화합니다. 참고: 플레이북에 사용자 입력이 필요한 경우 --mode stdout 과 호환되지 않습니다.

선택 사항: True 또는 False

기본값: True

CLI: --pae 또는 --playbook-artifact-enableENV: ANSIBLE_NAVIGATOR_PLAYBOOK_ARTIFACT_ENABLE설정 파일:

ansible-navigator:
  playbook-artifact:
    enable:

playbook-artifact-save-as

완료된 플레이북에서 생성된 아티팩트의 이름을 지정합니다.

기본값: {playbook_dir}/{playbook_name}-artifact-{ts_utc}.json

CLI: --pas 또는 --playbook-artifact-save-as

ENV: ANSIBLE_NAVIGATOR_PLAYBOOK_ARTIFACT_SAVE_AS

설정 파일:

ansible-navigator:
  playbook-artifact:
    save-as:

9장. Automation 콘텐츠 navigator로 Ansible 콘텐츠 문제 해결

콘텐츠 작성자는 Automation 콘텐츠 navigator를 사용하여 Ansible 콘텐츠(수집, 자동화 실행 환경 및 플레이북)의 문제를 해결하고 플레이북을 대화형으로 해결할 수 있습니다. 자동화 실행 환경 내부 또는 외부의 결과를 비교하고 문제를 해결할 수도 있습니다.

9.1. 플레이북 검토 결과 Automation 콘텐츠 navigator 아티팩트 파일을 사용하여

자동화 콘텐츠 navigator는 JSON 아티팩트 파일에 플레이북 실행 결과를 저장합니다. 이 파일을 사용하여 플레이북 결과를 다른 사용자와 공유하거나, 보안 또는 규정 준수 이유로 저장하고 나중에 검토 및 해결할 수 있습니다. 플레이북 실행을 검토하려면 아티팩트 파일만 있으면 됩니다. 플레이북 자체 또는 인벤토리 액세스에 액세스할 필요가 없습니다.

사전 요구 사항

  • 플레이북 실행의 Automation 콘텐츠 navigator 아티팩트 JSON 파일

절차

  • 아티팩트 파일을 사용하여 Automation 콘텐츠 navigator를 시작합니다.

    $ ansible-navigator replay simple_playbook_artifact.json
    1. 플레이북이 실행 중일 때 일치하는 플레이북 결과를 검토합니다.

      플레이북 결과

플레이북을 실행한 후와 같이 결과를 검토하기 위해 각 플레이 및 작업 옆에 있는 번호를 입력할 수 있습니다.

9.2. 자동화 콘텐츠 navigator 자주 묻는 질문

다음 Automation 콘텐츠 navigator FAQ를 사용하면 환경의 문제를 해결할 수 있습니다.

자동화 실행 환경을 사용할 때 ansible.cfg 파일은 어디에 위치합니까?
ansible.cfg 를 가장 쉽게 사용할 수 있는 위치는 플레이북과 통신할 프로젝트 디렉터리에 있습니다. 플레이북 디렉터리는 실행 환경에 자동으로 마운트되며 ansible.cfg 파일이 있습니다. ansible.cfg 파일이 다른 디렉터리에 있는 경우 ANSIBLE_CONFIG 변수를 설정하고 사용자 정의 볼륨 마운트로 지정된 디렉터리를 설정해야 합니다. ( 실행 환경-volume-mounts8.2절. “Automation Content navigator 일반 설정” 를 참조하십시오.
자동화 실행 환경을 사용하지 않는 경우 ansible.cfg 파일은 어디에 위치합니까?
Ansible은 자동화 실행 환경을 사용하지 않는 경우 일반적인 위치에서 ansible.cfg 를 찾습니다. 자세한 내용은 Ansible 구성 설정을 참조하십시오.
자동화 실행 환경을 사용할 때 Ansible 컬렉션을 어디에서 배치해야합니까?
Ansible 컬렉션을 가질 수 있는 가장 쉬운 위치는 플레이북의 통신 컬렉션 디렉터리(예: ansible-galaxy 컬렉션 install ansible.utils -p ./collections)의 프로젝트 디렉터리에 있습니다. 플레이북 디렉터리는 자동화 실행 환경에서 자동으로 마운트되고 Automation 콘텐츠 navigator에서 컬렉션을 찾습니다. 또 다른 옵션은 Ansible Builder를 사용하여 자동화 실행 환경에 컬렉션을 빌드하는 것입니다. 이 기능을 사용하면 자동화 컨트롤러가 플레이북 관련 추가 수집 디렉터리를 지원하므로 프로덕션에 준비된 콘텐츠 작성자 플레이북을 사용할 수 있습니다. 컬렉션이 다른 디렉터리에 있는 경우 ANSIBLE_COLLECTIONS_PATHS 변수를 설정하고 디렉터리에 대한 사용자 지정 볼륨 마운트를 구성합니다. ( execution-environment-volume-mounts에 대한 Automation Content navigator 일반 설정을 참조하십시오.).
자동화 실행 환경을 사용하지 않을 때 ansible 컬렉션을 배치해야 하는 이유는 무엇입니까?
자동화 실행 환경을 사용하지 않는 경우 Ansible은 컬렉션의 기본 위치를 찾습니다. Ansible Collections 사용자 가이드를 참조하십시오.
vars_prompt 또는 pause/prompt 가 사용될 때 플레이북이 중단되는 이유는 무엇입니까?
기본적으로 Automation 콘텐츠 navigator는 자동화 컨트롤러에서 플레이북을 실행하는 것과 동일한 방식으로 플레이북을 실행합니다. 이 작업은 프로덕션을 위해 준비된 콘텐츠 작성자 플레이북을 돕기 위해 수행되었습니다. vars_prompt 또는 pause\prompt 를 사용할 수 없는 경우 playbook-artifact 생성을 비활성화하면 Automation 콘텐츠 navigator가 ansible-playbook 과 호환되는 방식으로 플레이북을 실행하고 사용자 상호 작용을 허용합니다.
Automation 콘텐츠 navigator가 터미널 색상을 변경하거나 불명확한 것처럼 보이는 이유는 무엇입니까?
자동화 콘텐츠 navigator는 OSC4 호환성을 위해 터미널을 쿼리합니다. OSC4, 10, 11, 104, 110, 111은 터미널이 색상 변경 및 되돌리기를 지원한다는 것을 나타냅니다. 터미널이 해당 기능을 잘못 표시할 수 있습니다. OSC4 탐지는 --osc4 false 를 설정하여 비활성화할 수 있습니다. 환경 변수 또는 설정 파일에서 이를 처리하는 방법은 Automation Content navigator 일반 설정을 참조하십시오.
Automation 콘텐츠 navigator에서 사용하는 색상을 어떻게 변경할 수 있습니까?
--osc4 false 를 사용하여 Automation 콘텐츠 navigator가 터미널에 정의된 색상을 사용하도록 강제 적용합니다. 환경 변수 또는 설정 파일에서 이를 처리하는 방법은 Automation Content navigator 일반 설정을 참조하십시오.
Playbook 디렉토리에 있는 모든 site-artifact-2021-06-02T16:02:33.911259+00:00.json 파일은 무엇입니까?
자동화 콘텐츠 navigator는 모든 플레이북 실행에 대한 플레이북 아티팩트를 생성합니다. 이는 자동화 결과를 완료한 후 검토하거나 동료와 공유 및 문제 해결하거나 규정 준수 또는 변경 관리 목적을 유지하는 데 유용할 수 있습니다. 플레이북 아티팩트 파일에는 모든 플레이 및 작업에 대한 자세한 정보와 플레이북 실행의 stdout 이 포함되어 있습니다. UYou는 Automation 콘텐츠 navigator 세션에서 ansible-navigator replay <filename > 또는 :replay <filename >을 사용하여 플레이북 아티팩트를 검토할 수 있습니다. 모든 플레이북 아티팩트는 원하는 보기에 따라 --mode stdout--mode 대화형 으로 검토할 수 있습니다. 플레이북 아티팩트 작성 및 기본 파일 이름 지정 규칙을 비활성화할 수 있습니다. 환경 변수 또는 설정 파일에서 이를 처리하는 방법은 Automation Content navigator 일반 설정을 참조하십시오.
:open 을 사용할 때 vi 가 열려있는 이유는 무엇입니까?

자동화 콘텐츠 navigator는 기본 편집기의 터미널에 표시되는 모든 항목을 엽니다. 기본값은 vi +{line_number} {filename} 또는 EDITOR 환경 변수의 현재 값으로 설정됩니다. 이와 관련하여 편집기는 편집기가 console/terminal인지 여부를 나타내는 editor-console 설정입니다. 다음은 유용할 수 있는 대체 설정의 예입니다.

# emacs
ansible-navigator:
  editor:
    command: emacs -nw +{line_number} {filename}
    console: true
# vscode
ansible-navigator:
  editor:
    command: code -g {filename}:{line_number}
    console: false
#pycharm
ansible-navigator:
  editor:
    command: charm --line {line_number} {filename}
    console: false
설정 설정이 적용되는 순서는 무엇입니까?

Automation 콘텐츠 navigator 구성 시스템은 다양한 소스에서 설정을 가져와서 다음 순서로 계층적으로 적용합니다(마지막 적용된 변경 사항이 가장 널리 적용되는 경우).

  1. 기본 내부 값
  2. 설정 파일의 값
  3. 환경 변수의 값
  4. 명령줄에 지정된 플래그 및 인수
  5. 발행하는 동안 : 텍스트 기반 사용자 인터페이스 내의 명령
아무것도 작동하지 않았습니다. 어떻게 문제를 해결할 수 있습니까?
자동화 콘텐츠 navigator에는 적절한 로깅 메시지가 있습니다. --log-level debug 를 사용하여 디버그 로깅을 활성화할 수 있습니다. 버그가 발견되면 문제를 기록하고 로그 파일의 세부 정보를 포함하십시오.

법적 공지

Copyright © 2023 Red Hat, Inc.
The text of and illustrations in this document are licensed by Red Hat under a Creative Commons Attribution–Share Alike 3.0 Unported license ("CC-BY-SA"). An explanation of CC-BY-SA is available at http://creativecommons.org/licenses/by-sa/3.0/. In accordance with CC-BY-SA, if you distribute this document or an adaptation of it, you must provide the URL for the original version.
Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent permitted by applicable law.
Red Hat, Red Hat Enterprise Linux, the Shadowman logo, the Red Hat logo, JBoss, OpenShift, Fedora, the Infinity logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries.
Linux® is the registered trademark of Linus Torvalds in the United States and other countries.
Java® is a registered trademark of Oracle and/or its affiliates.
XFS® is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States and/or other countries.
MySQL® is a registered trademark of MySQL AB in the United States, the European Union and other countries.
Node.js® is an official trademark of Joyent. Red Hat is not formally related to or endorsed by the official Joyent Node.js open source or commercial project.
The OpenStack® Word Mark and OpenStack logo are either registered trademarks/service marks or trademarks/service marks of the OpenStack Foundation, in the United States and other countries and are used with the OpenStack Foundation's permission. We are not affiliated with, endorsed or sponsored by the OpenStack Foundation, or the OpenStack community.
All other trademarks are the property of their respective owners.