{"id":326770,"date":"2021-07-21T09:00:50","date_gmt":"2021-07-21T09:00:50","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=326770"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=326770","title":{"rendered":"\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u0443\u0435\u043c FreeIPA: \u043a\u0430\u043a \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Ansible \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c DNS \u0437\u0430\u043f\u0438\u0441\u044f\u043c\u0438 \u0447\u0435\u0440\u0435\u0437 Terraform"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/wg\/mz\/ik\/wgmziknbvgq5_8m0qzkaxpsy-pi.jpeg\"><\/p>\n<p>  \u0423 \u043d\u0430\u0441 \u0432 Altenar \u0441\u043e\u0431\u0440\u0430\u043b\u0430\u0441\u044c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0438 \u043f\u0440\u043e\u0434\u0432\u0438\u043d\u0443\u0442\u0430\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432. \u0417\u0430 \u044d\u0442\u0438 \u0433\u043e\u0434\u044b \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u043d\u0430\u043a\u043e\u043f\u043b\u0435\u043d \u0440\u0430\u0437\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u043d\u044b\u0439 \u043e\u043f\u044b\u0442 \u0432 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u0438 \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u0438 \u0432\u044b\u0441\u043e\u043a\u043e\u043d\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u0440\u0435\u043c\u044f \u043e\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043a\u043e\u043b\u043b\u0435\u0433\u0430\u043c \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0441 \u043c\u0438\u0440\u043e\u043c \u0441\u0432\u043e\u0438\u043c\u0438 \u0437\u043d\u0430\u043d\u0438\u044f\u043c\u0438. \u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u0425\u0430\u0431\u0440\u0435 \u043e\u043d\u0438 \u043f\u043e\u043a\u0430 \u043d\u0435 \u0433\u043e\u0442\u043e\u0432\u044b, \u0437\u0430\u0442\u043e \u0441\u043e\u0432\u0441\u0435\u043c \u043d\u0435 \u043f\u0440\u043e\u0442\u0438\u0432 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u043c\u043e\u0435\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435. \u041d\u0430\u0434\u0435\u044e\u0441\u044c \u043e\u0441\u0442\u0440\u043e\u0439 \u0430\u043b\u043b\u0435\u0440\u0433\u0438\u0438 \u044d\u0442\u043e \u0443 \u0432\u0430\u0441 \u043d\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442. \u0415\u0441\u043b\u0438 \u0431\u0443\u0434\u0443\u0442 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u043a \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0443, \u0441\u043c\u0435\u043b\u043e \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0439\u0442\u0435 \u0438\u0445 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445, \u043e\u0431\u0435\u0449\u0430\u044e \u043c\u043e\u043b\u043d\u0438\u0435\u043d\u043e\u0441\u043d\u043e \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0430\u0432\u0442\u043e\u0440\u0430\u043c \u0441\u0442\u0430\u0442\u044c\u0438. \u0414\u043e\u0431\u0440\u043e \u043f\u043e\u0436\u0430\u043b\u043e\u0432\u0430\u0442\u044c \u0437\u0430 \u043a\u0430\u0442.<a name=\"habracut\"><\/a><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/dx\/ak\/tq\/dxaktqwjqujo51jgoctikv24xbm.jpeg\"><\/p>\n<p>  \u041f\u0440\u0438\u0432\u0435\u0442, \u043c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u0414\u0435\u043d\u0438\u0441, \u0438 \u044f \u043e\u043a\u043e\u043b\u043e \u0434\u0432\u0443\u0445 \u043b\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u044e DevOps \u0438\u043d\u0436\u0435\u043d\u0435\u0440\u043e\u043c \u0432 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 Altenar. \u041d\u0430\u0448\u0430 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u0432 Google Cloud, \u0442\u0430\u043a \u0438 \u0432 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u043c \u043e\u0431\u043b\u0430\u043a\u0435 \u043d\u0430 \u0431\u0430\u0437\u0435 VMWare, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0431\u043e\u043b\u0435\u0435 200 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432 \u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u0430\u0448\u0438\u043d.<\/p>\n<p>  \u041a\u043e\u0433\u0434\u0430 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e Linux \u043c\u0430\u0448\u0438\u043d \u0432 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0432\u0435\u043b\u0438\u043a\u043e, \u0442\u043e \u0440\u0430\u043d\u043e \u0438\u043b\u0438 \u043f\u043e\u0437\u0434\u043d\u043e \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u0432 \u0446\u0435\u043d\u0442\u0440\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043e\u043c \u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u043c \u0438 \u0435\u0441\u043b\u0438 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0441 Windows \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 AD \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0438\u043d\u0434\u0443\u0441\u0442\u0440\u0438\u0430\u043b\u044c\u043d\u044b\u043c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043e\u043c, \u0442\u043e, \u043a\u043e\u0433\u0434\u0430 \u0434\u0435\u043b\u043e \u0434\u043e\u0445\u043e\u0434\u0438\u0442 \u0434\u043e Linux \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u0430\u043a\u0438\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u043a\u0430\u043a FreeIPA. <\/p>\n<p>  FreeIPA (Free Identity, Policy and Audit) \u2500 \u044d\u0442\u043e open-source \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0434\u043b\u044f Linux (\u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e\u0435 MS Active Directory), \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u0446\u0435\u043d\u0442\u0440\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0443\u0447\u0435\u0442\u043d\u044b\u043c\u0438 \u0437\u0430\u043f\u0438\u0441\u044f\u043c\u0438 \u0438 \u0446\u0435\u043d\u0442\u0440\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e.<\/p>\n<p>  \u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0443 RedHat \u0435\u0441\u0442\u044c \u0440\u0435\u0448\u0435\u043d\u0438\u0435 IdM, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0447\u0430\u0441\u0442\u044c\u044e RHEL. \u041e\u043d\u0438 \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438 \u0438\u0434\u0435\u043d\u0442\u0438\u0447\u043d\u044b \u0441 FreeIPA \u0438, \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e FreeIPA \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f upstream \u0432\u0435\u0440\u0441\u0438\u0435\u0439 \u0434\u043b\u044f IdM \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043e\u0431\u043a\u0430\u0442\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043d\u043e\u0432\u044b\u0435 \u0444\u0438\u0447\u0438 (\u043a\u0430\u043a Fedora \u0434\u043b\u044f RHEL).<\/p>\n<p>  FreeIPA \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043a\u043b\u0438\u0435\u043d\u0442-\u0441\u0435\u0440\u0432\u0435\u0440\u043d\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c. \u041a\u043b\u0438\u0435\u043d\u0442\u043e\u043c \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043b\u044e\u0431\u0430\u044f Linux \u043c\u0430\u0448\u0438\u043d\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u0430 \u0434\u043b\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 FreeIPA (IdM) \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u043c \u0434\u043e\u043c\u0435\u043d\u0430. \u041a\u043b\u0438\u0435\u043d\u0442 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Kerberos, NTP, DNS \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u0438 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0432.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/pm\/w4\/tp\/pmw4tpmwvb00sbbp7wkpilrgwry.png\"><\/p>\n<p>  \u041a\u0430\u043a \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0441 \u0440\u0435\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u0435\u0439 \u0438\u0437 \u0434\u0432\u0443\u0445 FreeIPA \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432 \u0441 DNS \u043c\u043e\u0436\u043d\u043e <a href=\"https:\/\/habr.com\/ru\/company\/pixonic\/blog\/325546\/\">\u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0432 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435<\/a>, \u0430 \u0434\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 FreeIPA \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f:<br \/>  \u25cf \u0424\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0438\u0440\u0443\u044e\u0449\u0438\u0439 FreeIPA \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u0441 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u043c DNS \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c<br \/>  \u25cf \u041e\u0434\u0438\u043d CentOS 7 \u0441\u0435\u0440\u0432\u0435\u0440 \u043f\u043e \u043a\u0440\u0430\u0439\u043d\u0435\u0439 \u043c\u0435\u0440\u0435 \u0441 1GB \u043f\u0430\u043c\u044f\u0442\u0438.<br \/>  \u25cf Ansible version: 2.8+<br \/>  \u25cf Terraform version: 0.13+<\/p>\n<p>  \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u043c\u043e\u0436\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c FreeIPA \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 <a href=\"https:\/\/access.redhat.com\/documentation\/en-us\/red_hat_enterprise_linux\/6\/html\/identity_management_guide\/installing_the_ipa_client_on_linux#client-basic-setup\" rel=\"nofollow noopener noreferrer\">\u0432\u0440\u0443\u0447\u043d\u0443\u044e<\/a>. \u042d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432 3 \u0448\u0430\u0433\u0430:<br \/>  1) \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043f\u0430\u043a\u0435\u0442 yum install ipa-client<br \/>  2) \u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 ipa-client-install<br \/>  3) \u041f\u0440\u043e\u0439\u0442\u0438 \u043f\u043e \u0448\u0430\u0433\u0430\u043c, \u043e\u0442\u0432\u0435\u0442\u0438\u0432 \u043d\u0430 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0449\u0438\u043a\u0430.<\/p>\n<p>  \u041d\u043e \u044f \u0443\u0432\u0435\u0440\u0435\u043d, \u0447\u0442\u043e \u0432\u0441\u0435 \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u044e\u0442 \u043f\u043b\u044e\u0441\u044b \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u043f\u043e\u0439\u0434\u0435\u043c \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0434\u0440\u0443\u0433\u0438\u043c \u043f\u0443\u0442\u0451\u043c. \u0412 Altenar \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0434\u0432\u0430 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u2500 Ansible \u0438 Terraform. \u0412 \u0434\u0430\u043d\u043d\u043e\u043c\u0443 \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u044b \u0440\u0435\u0448\u0438\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Ansible \u0438 \u0432\u0437\u044f\u043b\u0438 \u0440\u043e\u043b\u044c <a href=\"https:\/\/github.com\/freeipa\/ansible-freeipa\/tree\/master\/roles\/ipaclient\" rel=\"nofollow noopener noreferrer\">\u0438\u0437 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f<\/a> freeipa.org \u0441 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c \u043d\u0430\u0431\u043e\u0440\u043e\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0432 \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043a \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u043c \u0432 <a href=\"\/ipaclient\/defaults\/main.yml\">\/ipaclient\/defaults\/main.yml<\/a>.<\/p>\n<pre><code class=\"plaintext\">ipaclient_domain: nix.altenar.com ipaserver_domain: nix.altenar.com ipaserver_realm: NIX.ALTENAR.COM ipaclient_realm: NIX.ALTENAR.COM ipaclient_no_ntp: yes ipaclient_mkhomedir: yes<\/code><\/pre>\n<p>  Playbook \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0440\u043e\u043b\u0438 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<\/p>\n<pre><code class=\"plaintext\">--- - name: Playbook to configure IPA clients   hosts:   - linux   - tag_linux   become: yes   gather_facts: True   roles:   - { role: freeipa\/ipaclient, state: present }<\/code><\/pre>\n<p>  \u0418\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u043c\u044b \u0442\u0430\u043a\u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 ansible \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f DNS \u0437\u0430\u043f\u0438\u0441\u0435\u0439.<\/p>\n<pre><code class=\"plaintext\">tasks: - ipa_dnsrecord:     ipa_host: ipa.nix.altenar.com     ipa_pass: &lt;removed&gt;     state: present     zone_name: nix.altenar.com     record_name: &quot;{{inventory_hostname}}&quot;     record_type: 'A'     record_value: &quot;{{ansible_host}}&quot;     validate_certs: no     ipa_user: user<\/code><\/pre>\n<p>  \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u043b\u0430 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430: \u0447\u0442\u043e\u0431\u044b \u0441\u043e\u0437\u0434\u0430\u0442\u044c dns \u0437\u0430\u043f\u0438\u0441\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0431\u044b\u043b\u043e \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u044f\u0432\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c IP \u0430\u0434\u0440\u0435\u0441 &quot;{{ansible_host}}&quot; \u0432 inventory \u0444\u0430\u0439\u043b\u0435, \u0447\u0442\u043e \u0431\u044b\u043b\u043e \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u0443\u0434\u043e\u0431\u043d\u043e.<\/p>\n<pre><code class=\"plaintext\">[linux] xknm0.nix.altenar.com ansible_host=10.10.10.243<\/code><\/pre>\n<p>  \u0418 \u0442\u0430\u043a \u043a\u0430\u043a \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 Terraform \u0432 \u043d\u0430\u0448\u0435\u043c \u0447\u0430\u0441\u0442\u043d\u043e\u043c \u043e\u0431\u043b\u0430\u043a\u0435 \u0438 \u0441\u0442\u0430\u0440\u0430\u0435\u043c\u0441\u044f \u043f\u0440\u0438\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u043e\u0434\u0445\u043e\u0434\u0430 <a href=\"https:\/\/habr.com\/ru\/company\/dododev\/blog\/465137\/\">IaC<\/a> \u0431\u044b\u043b \u043d\u0430\u0439\u0434\u0435\u043d <a href=\"https:\/\/registry.terraform.io\/providers\/camptocamp\/freeipa\/latest\" rel=\"nofollow noopener noreferrer\">terraform-provider-freeipa<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u043b \u043d\u0430\u043c \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c DNS \u0437\u0430\u043f\u0438\u0441\u0438 \u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u0430\u0448\u0438\u043d.<\/p>\n<pre><code class=\"vhdl\">terraform {   required_providers {     freeipa = {       source = &quot;camptocamp\/freeipa&quot;       version = &quot;0.7.0&quot;     }   } }   provider freeipa {   host = &quot;ipa.nix.altenar.com&quot; # or set $FREEIPA_HOST   username = &quot;admin&quot; # or set $FREEIPA_USERNAME   password = &quot;&lt;removed&gt;&quot; # or set $FREEIPA_PASSWORD   insecure = true }   resource freeipa_dns_record &quot;test&quot; {   dnszoneidnsname = &quot;nix.altenar.com.&quot;   idnsname = &quot;test&quot;   records = [&quot;10.10.10.10&quot;]   type = &quot;A&quot; }<\/code><\/pre>\n<p>  \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0433\u043e\u0442\u043e\u0432\u0443\u044e DNS \u0437\u0430\u043f\u0438\u0441\u044c \u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u044b.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/a0\/5w\/ct\/a05wctbuchce1rlqlylb6k-v0q4.png\"><\/p>\n<p>  \u0418 \u043d\u0438\u0447\u0442\u043e \u043d\u0430\u043c \u043d\u0435 \u043c\u0435\u0448\u0430\u0435\u0442 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 FreeIPA \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Ansible \u0440\u043e\u043b\u0438.<\/p>\n<p>  \u0422\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f DNS \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 FreeIPA \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 \u0443 \u043d\u0430\u0441 \u0432 Altenar. \u041d\u0430\u0434\u0435\u044e\u0441\u044c, \u0447\u0442\u043e \u043d\u0430\u0448 \u043e\u043f\u044b\u0442 \u0431\u044b\u043b \u0432\u0430\u043c \u043f\u043e\u043b\u0435\u0437\u0435\u043d, \u043d\u0443 \u0430 \u043c\u044b \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u043c \u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u043b\u0430\u0439\u0444\u0445\u0430\u043a\u0430\u043c\u0438. <\/p>\n<p>  <b>P.S. <\/b>\u0415\u0441\u043b\u0438 \u0435\u0441\u0442\u044c \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u0438\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0435\u043b\u0438 \u0431\u044b \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043e \u0441\u0432\u043e\u0435\u043c \u043e\u043f\u044b\u0442\u0435 \u043f\u043e \u0437\u0430\u044f\u0432\u043b\u0435\u043d\u043d\u043e\u0439 \u0442\u0435\u043c\u0435, \u0441\u043c\u0435\u043b\u043e \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0435 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438.<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/568524\/\"> https:\/\/habr.com\/ru\/post\/568524\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/wg\/mz\/ik\/wgmziknbvgq5_8m0qzkaxpsy-pi.jpeg\"><\/p>\n<p>  \u0423 \u043d\u0430\u0441 \u0432 Altenar \u0441\u043e\u0431\u0440\u0430\u043b\u0430\u0441\u044c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0438 \u043f\u0440\u043e\u0434\u0432\u0438\u043d\u0443\u0442\u0430\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432. \u0417\u0430 \u044d\u0442\u0438 \u0433\u043e\u0434\u044b \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u043d\u0430\u043a\u043e\u043f\u043b\u0435\u043d \u0440\u0430\u0437\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u043d\u044b\u0439 \u043e\u043f\u044b\u0442 \u0432 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u0438 \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u0438 \u0432\u044b\u0441\u043e\u043a\u043e\u043d\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u0440\u0435\u043c\u044f \u043e\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043a\u043e\u043b\u043b\u0435\u0433\u0430\u043c \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0441 \u043c\u0438\u0440\u043e\u043c \u0441\u0432\u043e\u0438\u043c\u0438 \u0437\u043d\u0430\u043d\u0438\u044f\u043c\u0438. \u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u0425\u0430\u0431\u0440\u0435 \u043e\u043d\u0438 \u043f\u043e\u043a\u0430 \u043d\u0435 \u0433\u043e\u0442\u043e\u0432\u044b, \u0437\u0430\u0442\u043e \u0441\u043e\u0432\u0441\u0435\u043c \u043d\u0435 \u043f\u0440\u043e\u0442\u0438\u0432 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u043c\u043e\u0435\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435. \u041d\u0430\u0434\u0435\u044e\u0441\u044c \u043e\u0441\u0442\u0440\u043e\u0439 \u0430\u043b\u043b\u0435\u0440\u0433\u0438\u0438 \u044d\u0442\u043e \u0443 \u0432\u0430\u0441 \u043d\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442. \u0415\u0441\u043b\u0438 \u0431\u0443\u0434\u0443\u0442 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u043a \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0443, \u0441\u043c\u0435\u043b\u043e \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0439\u0442\u0435 \u0438\u0445 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445, \u043e\u0431\u0435\u0449\u0430\u044e \u043c\u043e\u043b\u043d\u0438\u0435\u043d\u043e\u0441\u043d\u043e \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0430\u0432\u0442\u043e\u0440\u0430\u043c \u0441\u0442\u0430\u0442\u044c\u0438. \u0414\u043e\u0431\u0440\u043e \u043f\u043e\u0436\u0430\u043b\u043e\u0432\u0430\u0442\u044c \u0437\u0430 \u043a\u0430\u0442.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-326770","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/326770","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=326770"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/326770\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=326770"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=326770"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=326770"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}