3.4. Automation Hub에서 컬렉션 설치

Automation Hub를 사용하는 경우 Automation Hub에 호스팅된 RHEL 시스템 역할 컬렉션을 설치할 수 있습니다.

사전 요구 사항

  • 하나 이상의 관리형 노드에 대한 액세스 및 권한.
  • Red Hat Ansible Core가 기타 시스템을 구성하는 시스템인 제어 노드 액세스 및 사용 권한.

    제어 노드에서 다음이 있어야 합니다.

    • ansible-corerhel-system-roles 패키지가 설치됩니다.
    • 관리 노드를 나열하는 인벤토리 파일.

절차

  1. ansible.cfg 구성 파일의 콘텐츠의 기본 소스로 Red Hat Automation Hub를 정의합니다. 컨텐츠의 기본 소스로 Red Hat Automation Hub 구성을 참조하십시오.
  2. Automation Hub에서 redhat.rhel_system_roles 컬렉션을 설치합니다.

    # ansible-galaxy collection install redhat.rhel_system_roles

    설치가 완료되면 redhat.rhel_system_roles.<role_name> 으로 역할을 사용할 수 있습니다. 또한 /usr/share/ansible/collections/ansible_collections/redhat/rhel_system_roles/roles/<role_name>/README.md 에서 각 역할에 대한 문서를 찾을 수 있습니다.

검증 단계

설치를 확인하려면 localhost에서 확인 모드로 kernel_settings 역할을 실행합니다. Ansible package 모듈에 필요하므로 --become 매개변수도 사용해야 합니다. 그러나 매개변수는 시스템을 변경하지 않습니다.

  1. 다음 명령을 실행합니다.

    $ ansible-playbook -c local -i localhost, --check --become /usr/share/ansible/collections/ansible_collections/redhat/rhel_system_roles/tests/kernel_settings/tests_default.yml

명령 출력의 마지막 줄에는 failed=0 값이 포함되어야 합니다.

참고

localhost 이후의 쉼표는 필수입니다. 목록에 호스트가 하나만 있는 경우에도 추가해야 합니다. ansible-playbook 이 없으면 localhost 를 파일 또는 디렉터리로 식별합니다.

추가 리소스