3.3. RHEL의 패키지에서 Ansible 개발 툴 설치
Ansible 개발 툴은 Ansible Automation Platform RPM(Red Hat Package Manager) 패키지에 번들로 제공됩니다. Ansible Automation Platform 설치에 대한 정보는 RPM 설치 설명서를 참조하십시오.
사전 요구 사항
- RHEL을 설치했습니다.
- Red Hat Subscription Manager에 시스템을 등록했습니다.
- 컨테이너화 플랫폼(예: Podman 또는 Docker)이 설치되어 있습니다.
프로세스
다음 명령을 실행하여 SCA(Simple Content Access)가 활성화되어 있는지 확인합니다.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow sudo subscription-manager status
$ sudo subscription-manager status
Simple Content Access를 활성화하면 출력에 다음 메시지가 포함됩니다.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Content Access Mode is set to Simple Content Access.
Content Access Mode is set to Simple Content Access.
Simple Content Access가 활성화되지 않은 경우 Red Hat Ansible Automation Platform SKU를 연결합니다.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow sudo subscription-manager attach --pool=<sku-pool-id>
$ sudo subscription-manager attach --pool=<sku-pool-id>
다음 명령을 사용하여 Ansible 개발 툴을 설치합니다.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow sudo dnf install --enablerepo=ansible-automation-platform-2.5-for-rhel-8-x86_64-rpms ansible-dev-tools
$ sudo dnf install --enablerepo=ansible-automation-platform-2.5-for-rhel-8-x86_64-rpms ansible-dev-tools
Copy to Clipboard Copied! Toggle word wrap Toggle overflow sudo dnf install --enablerepo=ansible-automation-platform-2.5-for-rhel-9-x86_64-rpms ansible-dev-tools
$ sudo dnf install --enablerepo=ansible-automation-platform-2.5-for-rhel-9-x86_64-rpms ansible-dev-tools
확인:
Ansible 개발 툴 구성 요소가 설치되었는지 확인합니다.
rpm -aq | grep ansible
$ rpm -aq | grep ansible
출력에는 설치된 Ansible 패키지가 표시됩니다.
ansible-sign-0.1.1-2.el9ap.noarch ansible-creator-24.4.1-1.el9ap.noarch python3.11-ansible-runner-2.4.0-0.1.20240412.git764790f.el9ap.noarch ansible-runner-2.4.0-0.1.20240412.git764790f.el9ap.noarch ansible-builder-3.1.0-0.2.20240413.git167ed5c.el9ap.noarch ansible-dev-environment-24.1.0-2.el9ap.noarch ansible-core-2.16.6-0.1.20240413.gite636132.el9ap.noarch python3.11-ansible-compat-4.1.11-2.el9ap.noarch python3.11-pytest-ansible-24.1.2-1.el9ap.noarch ansible-lint-6.14.3-4.el9ap.noarch ansible-navigator-3.4.1-2.el9ap.noarch python3.11-tox-ansible-24.2.0-1.el9ap.noarch ansible-dev-tools-2.5-2.el9ap.noarch
ansible-sign-0.1.1-2.el9ap.noarch
ansible-creator-24.4.1-1.el9ap.noarch
python3.11-ansible-runner-2.4.0-0.1.20240412.git764790f.el9ap.noarch
ansible-runner-2.4.0-0.1.20240412.git764790f.el9ap.noarch
ansible-builder-3.1.0-0.2.20240413.git167ed5c.el9ap.noarch
ansible-dev-environment-24.1.0-2.el9ap.noarch
ansible-core-2.16.6-0.1.20240413.gite636132.el9ap.noarch
python3.11-ansible-compat-4.1.11-2.el9ap.noarch
python3.11-pytest-ansible-24.1.2-1.el9ap.noarch
ansible-lint-6.14.3-4.el9ap.noarch
ansible-navigator-3.4.1-2.el9ap.noarch
python3.11-tox-ansible-24.2.0-1.el9ap.noarch
ansible-dev-tools-2.5-2.el9ap.noarch
성공적으로 설치하면 ansible-creator에 대한 도움말 문서를 볼 수 있습니다.
ansible-creator --help
$ ansible-creator --help
usage: ansible-creator [-h] [--version] command ...
The fastest way to generate all your ansible content.
Positional arguments:
command
add Add resources to an existing Ansible project.
init Initialize a new Ansible project.
Options:
--version Print ansible-creator version and exit.
-h --help Show this help message and exit