오프라인 환경 구축 Ansible편
개요
오프라인 환경에서 Ansible을 빌드하는 절차.
Ansible은 프로비저닝을위한 구성 관리 도구입니다.
자세한 것은, 프로비저닝 도구 비교 참조.
절차
Ansible에는 Collection과 Role이라는 두 가지 재사용 가능한 구성 관리 단위가 있습니다.
Ansible에는 Collection과 Role이라는 두 가지 재사용 가능한 구성 관리 단위가 있습니다.
구성 관리 단위마다 오프라인에서의 사용 방법이 다르다.
컬렉션
온라인 터미널
온라인 단말기에서 다음 절차를 수행합니다.
Ansible Galaxy 에서 Collection을 검색합니다.

Download tar ball 버튼을 클릭하여 tar ball을 다운로드합니다.

오프라인 터미널
오프라인 단말기에서 다음 절차를 수행한다.
다음 명령을 실행하여 Collection을 설치합니다.
# Command
$ ansible-galaxy collection install <collection tar ball name>
# Example
$ ansible-galaxy collection install sindhuparvathi_gopi-ansible_collection_template-1.0.2.tar.gz
롤
Role은 Collection과 달리 오프라인 tar ball 다운로드 기능이 없습니다.
그래서 GitHub에서 Role을 다운로드하여 tar ball을 만듭니다.
온라인 터미널
Ansible Galaxy 에서 Role 검색하기.

GitHub Repo 버튼에서 Role 리포지토리를 표시합니다.

출처 : h tps : //가 ぁ xy. 안시 bぇ. 코 m / 게 r ぃんぐ y / 그럼

출처 : htps : // 기주 b. 코 m / 게 r ぃ んぐ y / 안시 b ぇ - 로 ぇ
코드 버튼을 클릭하고 Download ZIP 링크를 클릭하고 소스 코드를 zip 형식으로 다운로드합니다.

출처 : htps : // 기주 b. 코 m / 게 r ぃ んぐ y / 안시 b ぇ - 로 ぇ
오프라인 터미널
zip 파일을 tar.gz로 다시 압축합니다.
# Command
$ unzip <zip file name>.zip
$ tar czvf <tar file name>.tar.gz <zip file name>/
# Example
$ unzip ansible-role-java-master.zip
$ tar czvf ansible-role-java-master.tar.gz ansible-role-java-master/
requirements.yml
를 작성한다. requirements.yml
에 Role의 이름, 버전과 Role의 tar ball과의 대응 관계를 정의한다.requirements.yml
# Template
- src: ./<tar file name>.tar.gz
name: <role name>
version: <role version>
# Example
- src: ./ansible-role-java-master.tar.gz
name: "geerlingguy.java"
version: "1.10.0"
requirements.yml
를 사용하여 Role을 설치합니다.$ ansible-galaxy install -r requirements.yml
Reference
이 문제에 관하여(오프라인 환경 구축 Ansible편), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/kannkyo/items/255c0b8744a0ca7f4a13텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)