17.3. 마지막 IdM 서버 역할을 호스팅하는 경우에도 IdM 서버가 없는지 확인
Ansible을 사용하여 서버에서 마지막 IdM 서비스 인스턴스가 실행 중인 경우에도 RHEL IdM(Identity Management) 서버가 없는지 확인할 수 있습니다. CA(인증 기관), KRA(키 복구 기관) 또는 DNS 서버는 모두 IdM 서비스의 예입니다.
CA, KRA 또는 DNS 서버로 사용되는 마지막 서버를 제거하면 IdM 기능이 심각하게 중단됩니다. ipa service-find
명령을 사용하여 어떤 IdM 서버에서 실행 중인지 수동으로 확인할 수 있습니다. CA 서버의 기본 이름은 dogtag/server_name/realM_NAME
입니다.
ansible-freeipa
ipaserver
역할과 달리 이 플레이북에 사용된 ipaserver
모듈은 서버에서 IdM 서비스를 제거하지 않습니다.
사전 요구 사항
제어 노드에서 다음을 수행합니다.
- Ansible 버전 2.15 이상을 사용하고 있습니다.
-
freeipa.ansible_freeipa
컬렉션을 설치했습니다. - 이 예제에서는 ~/MyPlaybooks/ 디렉터리에서 IdM 서버의 FQDN(정규화된 도메인 이름)을 사용하여 Ansible 인벤토리 파일을 생성했다고 가정합니다.
-
이 예제에서는 secret.yml Ansible vault가
ipaadmin_password
를 저장한다고 가정합니다.
-
freeipa.ansible_freeipa
모듈이 실행되는 대상 노드인 대상 노드는 IdM 도메인의 일부입니다. IdM 클라이언트, 서버 또는 복제본입니다. -
인벤토리 파일에 정의된 IdM 서버로의 제어 노드에서
SSH
연결이 올바르게 작동합니다.
프로세스
~/MyPlaybooks/ 디렉터리로 이동합니다.
cd ~/MyPlaybooks/
$ cd ~/MyPlaybooks/
Copy to Clipboard Copied! Toggle word wrap Toggle overflow /usr/share/ansible/collections/ansible_collections/freeipa/ansible_freeipa/
Ansible 플레이북 파일을 복사합니다.server/
디렉터리에 있는 server-absent-ignore-last-last-of-role.ymlcp /usr/share/ansible/collections/ansible_collections/freeipa/ansible_freeipa/server/server-absent-ignore-last-of-role.yml server-absent-ignore-last-of-role-copy.yml
$ cp /usr/share/ansible/collections/ansible_collections/freeipa/ansible_freeipa/server/server-absent-ignore-last-of-role.yml server-absent-ignore-last-of-role-copy.yml
Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
편집을 위해
server-absent-ignore-last-of-role-copy.yml
파일을 엽니다. ipaserver
작업 섹션에서 다음 변수를 설정하여 파일을 조정하고 파일을 저장합니다.-
ipaadmin_password
변수를 IdM관리자
의 암호로 설정합니다. -
name
변수를 서버의FQDN
으로 설정합니다. 예제 서버의FQDN
은 server123.idm.example.com 입니다. -
ignore_last_of_role
변수가true
로 설정되어 있는지 확인합니다. -
state
변수를absent
로 설정합니다.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
Ansible 플레이북을 실행하고 플레이북 파일과 인벤토리 파일을 지정합니다.
ansible-playbook --vault-password-file=password_file -v -i inventory server-absent-ignore-last-of-role-copy.yml
$ ansible-playbook --vault-password-file=password_file -v -i inventory server-absent-ignore-last-of-role-copy.yml
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - server123.idm.example.com 을 가리키는 모든 이름 서버(NS) DNS 레코드가 DNS 영역에서 삭제되었는지 확인합니다. 이는 IdM 또는 외부 DNS에서 관리하는 통합 DNS를 사용하는지 여부와 관계없이 적용됩니다.