2장. Automation Services Catalog와의 통합을 지원하도록 플레이북 set_stats 필드 업데이트


플레이북을 업데이트하여 주문 프로세스 워크플로에서 Automation Services Catalog에 정보를 전달하고 제품 전체에 대체 가능한 변수를 지원할 수 있습니다.

2.1. Automation Services Catalog에 값을 반환하는 플레이북 작성

Automation Services Catalog에 값을 반환하도록 설계된 플레이북을 작성할 수 있습니다. expose_to _ cloud_redhat_com_ 을 접두사로 지정하면 해당 값을 Automation Services Catalog로 반환합니다. 그런 다음 대체 가능한 변수를 사용하여 해당 값을 추가 플레이북을 통해 전달할 수 있습니다.

아래 플레이북 예제를 사용하여 set_stats 값에 대해 알아보고 값을 Automation Services Catalog에 다시 전달하고 순서 프로세스에서 후속 플레이북에서 대체 값으로 사용합니다.

플레이북 주문하기 전 예

전에 플레이북이 즐겨 찾는 색상의 Automation Services Catalog set_stats 값으로 돌아갑니다.

# This playbook prints a simple debug message and set_stats
- name: Echo Hello, world!
  hosts: localhost
  gather_facts: yes
  tasks:
    - debug:
        msg: "Hello, world!"

    - set_stats:
        data:
          expose_to_cloud_redhat_com_favorite_color: "orange"
Copy to Clipboard Toggle word wrap

제품 순서 플레이북의 예

이 플레이북은 대체 값을 다시 Automation Services Catalog에 아티팩트 값으로 전달합니다.

# This playbook prints a simple debug message with given information
- name: Echo Hello, world!
  hosts: localhost
  gather_facts: yes
  tasks:
    - debug:
        msg: "Hello, {{favorite_color}} world!"

    - set_stats:
        data:
          expose_to_cloud_redhat_com_after_data: "{{favorite_color}}"
Copy to Clipboard Toggle word wrap

플레이북 주문 후 예

아래 주문 후 플레이북 예제에는 제품 플레이북에서 전달한 artifact after_data 값이 포함됩니다.

# This playbook prints a simple debug message with given information
- name: Echo Hello, world!
  hosts: localhost
  gather_facts: yes
  tasks:
    - debug:
        msg: "{{after_data}}"
~
Copy to Clipboard Toggle word wrap
맨 위로 이동
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다. 최신 업데이트를 확인하세요.

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

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

Theme

© 2025 Red Hat