17장. Ansible을 사용하여 IdM 서버 관리
Ansible을 사용하여 RHEL IdM(Identity Management) 토폴로지에서 서버를 관리할 수 있습니다. ansible-freeipa 패키지의 server 모듈을 사용하여 IdM 토폴로지에 서버가 있는지 확인할 수 있습니다. 복제본을 숨기거나 복제본을 볼 수도 있습니다.
17.1. Ansible을 사용하여 IdM 서버가 있는지 확인 링크 복사링크가 클립보드에 복사되었습니다!
Ansible 플레이북에서 ipaserver ansible-freeipa 모듈을 사용하여 RHEL IdM(Identity Management) 서버가 있는지 확인할 수 있습니다.
ipaserver Ansible 모듈은 IdM 서버를 설치하지 않습니다.
사전 요구 사항
제어 노드에서 다음을 수행합니다.
- Ansible 버전 2.15 이상을 사용하고 있습니다.
-
freeipa.ansible_freeipa컬렉션을 설치했습니다. - 이 예제에서는 ~/MyPlaybooks/ 디렉터리에서 IdM 서버의 FQDN(정규화된 도메인 이름)을 사용하여 Ansible 인벤토리 파일을 생성했다고 가정합니다.
-
이 예제에서는 secret.yml Ansible vault가
ipaadmin_password를 저장하고 secret.yml 파일을 보호하는 암호를 저장하는 파일에 대한 액세스 권한이 있다고 가정합니다.
-
freeipa.ansible_freeipa모듈이 실행되는 대상 노드인 대상 노드는 IdM 도메인의 일부입니다. IdM 클라이언트, 서버 또는 복제본입니다.
프로세스
~/MyPlaybooks/ 디렉터리로 이동합니다.
cd ~/MyPlaybooks/
$ cd ~/MyPlaybooks/Copy to Clipboard Copied! Toggle word wrap Toggle overflow /usr/share/ansible/collections/ansible_collections/freeipa/ansible_freeipa/playbooks/server/디렉터리에 있는server-present.ymlAnsible 플레이북 파일을 복사합니다.cp /usr/share/ansible/collections/ansible_collections/freeipa/ansible_freeipa/playbooks/server/server-present.yml server-present-copy.yml
$ cp /usr/share/ansible/collections/ansible_collections/freeipa/ansible_freeipa/playbooks/server/server-present.yml server-present-copy.ymlCopy to Clipboard Copied! Toggle word wrap Toggle overflow -
편집할
server-present-copy.yml파일을 엽니다. freeipa.ansible_freeipa.ipaserver작업 섹션에서name변수를 서버의FQDN으로 설정합니다. 예제 서버의FQDN은 server123.idm.example.com 입니다.Copy to Clipboard Copied! Toggle word wrap Toggle overflow - 파일을 저장합니다.
Ansible 플레이북을 실행하고 플레이북 파일과 인벤토리 파일을 지정합니다.
ansible-playbook --vault-password-file=password_file -v -i inventory server-present-copy.yml
$ ansible-playbook --vault-password-file=password_file -v -i inventory server-present-copy.ymlCopy to Clipboard Copied! Toggle word wrap Toggle overflow