이를 플레이북에 추가해야 하므로 생성 및 구성한 매핑 파일이 있는지 확인합니다(이 경우 disaster_recovery_vars.yml ).
기본 사이트 및 보조 사이트의 관리자 암호를 저장하도록 암호 파일(예: password.yml)을 정의할 수 있습니다. 예를 들면 다음과 같습니다.
---
# This file is in plain text, if you want to
# encrypt this file, please execute following command:
#
# $ ansible-vault encrypt passwords.yml
#
# It will ask you for a password, which you must then pass to
# ansible interactively when executing the playbook.
#
# $ ansible-playbook myplaybook.yml --ask-vault-pass
#
dr_sites_primary_password: primary_password
dr_sites_secondary_password: secondary_password
---
#This file is in plain text, if you want to#encrypt this file, please execute following command:#
#$ ansible-vault encrypt passwords.yml#
#It will ask you for a password, which you must then pass to#ansible interactively when executing the playbook.#
#$ ansible-playbook myplaybook.yml --ask-vault-pass#
dr_sites_primary_password: primary_password
dr_sites_secondary_password: secondary_password
Copy to ClipboardCopied!Toggle word wrapToggle overflow
참고
보안을 강화하기 위해 암호 파일을 암호화할 수 있습니다. 그러나 플레이북을 실행할 때 --ask-vault-pass 매개변수를 사용해야 합니다. 자세한 내용은 관리 가이드에서Ansible 역할을 사용하여 Red Hat Virtualization 구성 을 참조하십시오.
이 예제에서 장애 조치 및 장애 조치(failover)라는 Ansible 플레이북의 이름은 dr-rhv-failover.yml 및 dr-rhv-failback.yml 입니다.