{"id":195734,"date":"2020-07-08T18:42:53","date_gmt":"2020-07-08T10:42:53","guid":{"rendered":"https:\/\/gulass.cn\/?p=195734"},"modified":"2020-07-08T18:42:53","modified_gmt":"2020-07-08T10:42:53","slug":"ex294","status":"publish","type":"post","link":"https:\/\/gulass.cn\/ex294.html","title":{"rendered":"EX294\uff1a\u7ea2\u5e3d\u4f01\u4e1a Linux 8 \u7684\u7ea2\u5e3d\u8ba4\u8bc1\u5de5\u7a0b\u5e08\uff08RHCE\uff09\u8003\u8bd5"},"content":{"rendered":"
\u8003\u8bd5\u6982\u8ff0<\/strong><\/p>\n \u7ea2\u5e3d\u4f01\u4e1a Linux 8 \u7684\u7ea2\u5e3d\u8ba4\u8bc1\u5de5\u7a0b\u5e08\uff08RHCE\uff09\u8003\u8bd5\uff08EX294\uff09\u57fa\u4e8e\u5b9e\u9645\u64cd\u4f5c\u80fd\u529b\uff0c\u65e8\u5728\u8003\u6838\u60a8\u5728\u4ee5\u4e0b\u65b9\u9762\u7684\u77e5\u8bc6\u548c\u6280\u80fd\uff1a\u4f7f\u7528\u7ea2\u5e3d\u00ae Ansible\u00ae \u5f15\u64ce\u7ba1\u7406\u591a\u4e2a\u7cfb\u7edf\uff1b\u4f7f\u7528 Ansible \u8de8\u591a\u4e2a\u7cfb\u7edf\u6267\u884c\u5e38\u89c1\u7cfb\u7edf\u7ba1\u7406\u4efb\u52a1\u3002\u6b64\u9879\u8003\u8bd5\u6240\u8003\u6838\u7684\u6280\u80fd\u4e3a IT \u4eba\u5458\u8de8\u591a\u4e2a\u7ea2\u5e3d\u4ea7\u54c1\u8fdb\u884c\u7cfb\u7edf\u7ba1\u7406\u5960\u5b9a\u4e86\u57fa\u7840\u3002<\/p>\n \u901a\u8fc7\u6b64\u9879\u8003\u8bd5\u540e\uff0c\u60a8\u5c06\u6210\u4e3a RHCE\u00ae\uff0c\u5e76\u5c06\u8ba1\u5165\u7ea2\u5e3d\u8ba4\u8bc1\u67b6\u6784\u5e08\uff08RHCA\u00ae\uff09\u7684\u8ba4\u8bc1\u6210\u7ee9\u4e2d\u3002<\/p>\n \u672c\u8003\u8bd5\u57fa\u4e8e\u7ea2\u5e3d\u4f01\u4e1a Linux\u00ae 8 \u548c\u7ea2\u5e3d Ansible \u5f15\u64ce 2.8\u3002<\/p>\n \u8003\u8bd5\u5bf9\u8c61<\/strong><\/p>\n \u8003\u8bd5\u524d\u63d0\u6761\u4ef6<\/strong><\/p>\n \u8003\u8bd5\u8981\u70b9<\/strong><\/p>\n \u4f5c\u4e3a RHCE \u8003\u751f\uff0c\u60a8\u5e94\u8be5\u80fd\u591f\u5904\u7406\u7ea2\u5e3d\u8ba4\u8bc1\u7cfb\u7edf\u7ba1\u7406\u5458\u9700\u627f\u62c5\u7684\u6240\u6709\u804c\u8d23\uff0c\u5305\u62ec\u4ee5\u4e0b\u4efb\u52a1\uff1a<\/p>\n \u80fd\u591f\u6267\u884c\u7ea2\u5e3d\u8ba4\u8bc1\u7cfb\u7edf\u7ba1\u7406\u5458\u8d1f\u8d23\u7684\u6240\u6709\u4efb\u52a1<\/p>\n \u4e86\u89e3 Ansible \u7684\u6838\u5fc3\u7ec4\u4ef6<\/p>\n \u5b89\u88c5\u548c\u914d\u7f6e Ansible \u63a7\u5236\u8282\u70b9<\/p>\n \u914d\u7f6e Ansible \u6258\u7ba1\u7684\u8282\u70b9<\/p>\n \u811a\u672c\u7ba1\u7406\u4efb\u52a1<\/p>\n \u521b\u5efa Ansible play \u548c playbook<\/p>\n \u4f7f\u7528 Ansible \u6a21\u5757\u6267\u884c\u6709\u5173\u4ee5\u4e0b\u5185\u5bb9\u7684\u7cfb\u7edf\u7ba1\u7406\u4efb\u52a1\uff1a<\/p>\n \u4f7f\u7528\u89d2\u8272<\/p>\n \u4f7f\u7528\u9ad8\u7ea7 Ansible \u529f\u80fd<\/p>\n \u521b\u5efa\u548c\u4f7f\u7528\u6a21\u677f\u6765\u521b\u5efa\u81ea\u5b9a\u4e49\u7684\u914d\u7f6e\u6587\u4ef6 \u4f7f\u7528 Ansible \u53d8\u91cf\u548c fact \u521b\u5efa\u548c\u4f7f\u7528\u89d2\u8272 \u4ece Ansible Galaxy \u4e0b\u8f7d\u89d2\u8272\u5e76\u4f7f\u7528 \u5e76\u884c\u7ba1\u7406 \u5229\u7528 playbook \u4e2d\u7684 Ansible Vault \u4fdd\u62a4\u654f\u611f\u6570\u636e \u4f7f\u7528\u63d0\u4f9b\u7684\u6587\u6863\u67e5\u627e\u6709\u5173 Ansible \u6a21\u5757\u548c\u547d\u4ee4\u7684\u7279\u5b9a\u4fe1\u606f<\/p>\n \u5bf9\u4e8e\u6240\u6709\u57fa\u4e8e\u5b9e\u9645\u64cd\u4f5c\u80fd\u529b\u7684\u7ea2\u5e3d\u8003\u8bd5\uff0c\u5728\u91cd\u65b0\u542f\u52a8\u540e\uff0c\u60a8\u7684\u6240\u6709\u7cfb\u7edf\u914d\u7f6e\u5fc5\u987b\u5728\u6ca1\u6709\u4eba\u5de5\u5e72\u9884\u7684\u60c5\u51b5\u4e0b\u4ecd\u7136\u6709\u6548\u3002<\/p>\n \u5907\u8003<\/strong><\/p>\n \u7ea2\u5e3d\u5efa\u8bae\u60a8\u5b8c\u6210\u7ea2\u5e3d\u7cfb\u7edf\u7ba1\u7406\u4e00\uff08RH124\uff09\u3001\u00a0\u7ea2\u5e3d\u7cfb\u7edf\u7ba1\u7406\u4e8c\uff08RH134\uff09\u548c\u7ea2\u5e3d\u7cfb\u7edf\u7ba1\u7406\u4e09\uff1a\u5229\u7528 Ansible \u5b9e\u73b0 Linux \u81ea\u52a8\u5316\uff08RH294\uff09\u8bfe\u7a0b\uff0c\u4e3a\u53c2\u52a0\u6b64\u9879\u8003\u8bd5\u505a\u597d\u51c6\u5907\u3002\u6b64\u7c7b\u8bfe\u7a0b\u5e76\u975e\u5f3a\u5236\u6027\u8981\u6c42\uff0c\u8003\u751f\u53ef\u4ee5\u9009\u62e9\u53ea\u53c2\u52a0\u8003\u8bd5\u3002<\/p>\n \u5c3d\u7ba1\u53c2\u52a0\u7ea2\u5e3d\u57f9\u8bad\u8bfe\u7a0b\u662f\u60a8\u5907\u8003\u7684\u4e00\u4e2a\u91cd\u8981\u90e8\u5206\uff0c\u4f46\u53ea\u53c2\u52a0\u8bfe\u7a0b\u5e76\u4e0d\u80fd\u786e\u4fdd\u987a\u5229\u901a\u8fc7\u8003\u8bd5\u3002\u60a8\u7684\u4ee5\u5f80\u7ecf\u9a8c\u3001\u5b9e\u8df5\u4ee5\u53ca\u81ea\u8eab\u8d44\u8d28\u4e5f\u662f\u51b3\u5b9a\u80fd\u5426\u901a\u8fc7\u8003\u8bd5\u7684\u91cd\u8981\u56e0\u7d20\u3002<\/p>\n \u6211\u4eec\u62e5\u6709\u4f17\u591a\u6709\u5173\u7ea2\u5e3d\u4ea7\u54c1\u7cfb\u7edf\u7ba1\u7406\u7684\u4e66\u7c4d\u548c\u5b66\u4e60\u8d44\u6e90\u4f9b\u60a8\u9009\u62e9\u3002\u7ea2\u5e3d\u672a\u6307\u5b9a\u4efb\u4f55\u5185\u5bb9\u4f5c\u4e3a\u5907\u8003\u6307\u5357\u3002\u7136\u800c\uff0c\u60a8\u53ef\u80fd\u53d1\u73b0\u989d\u5916\u7684\u9605\u8bfb\u4f1a\u5bf9\u52a0\u6df1\u7406\u89e3\u6709\u5e2e\u52a9\u3002<\/p>\n \u8003\u8bd5\u5f62\u5f0f<\/strong><\/p>\n \u6b64\u9879\u5b9e\u8df5\u578b\u8003\u8bd5\u4fa7\u91cd\u4e8e\u5bf9\u4e2a\u4eba\u5b9e\u9645\u64cd\u4f5c\u80fd\u529b\u7684\u8003\u5bdf\uff0c\u8981\u6c42\u60a8\u4f7f\u7528\u7ea2\u5e3d Ansible \u5f15\u64ce\u6267\u884c\u771f\u5b9e\u4efb\u52a1\u3002\u8003\u8bd5\u4e2d\u5c06\u4e3a\u60a8\u63d0\u4f9b\u591a\u4e2a\u7cfb\u7edf\uff0c\u60a8\u9700\u8981\u5b89\u88c5\u548c\u914d\u7f6e Ansible \u5f15\u64ce\uff0c\u7136\u540e\u4f7f\u7528\u5b83\u6765\u6267\u884c\u4e0e\u5b9e\u9645\u5de5\u4f5c\u7c7b\u4f3c\u7684\u6807\u51c6\u7cfb\u7edf\u7ba1\u7406\u4efb\u52a1\u3002<\/p>\n \u60a8\u9700\u8981\u521b\u5efa Ansible Playbook\uff0c\u5e76\u4f7f\u7528\u8fd9\u4e9b playbook \u4e3a\u7279\u5b9a\u89d2\u8272\u548c\u884c\u4e3a\u914d\u7f6e\u7cfb\u7edf\u3002\u60a8\u7684\u64cd\u4f5c\u7ed3\u679c\u5c06\u901a\u8fc7\u4ee5\u4e0b\u65b9\u5f0f\u8fdb\u884c\u8bc4\u4f30\uff1a\u5c06\u60a8\u5728\u8003\u8bd5\u671f\u95f4\u521b\u5efa\u7684 playbook \u5e94\u7528\u4e8e\u65b0\u5b89\u88c5\u7684\u7cfb\u7edf\uff0c\u5e76\u9a8c\u8bc1\u8fd9\u4e9b\u7cfb\u7edf\u548c\u670d\u52a1\u662f\u5426\u6309\u6307\u5b9a\u65b9\u5f0f\u5de5\u4f5c\u3002<\/p>\n \u8003\u8bd5\u671f\u95f4\uff0c\u5c06\u4e3a\u60a8\u63d0\u4f9b\u4e00\u4efd\u4e0e\u8003\u8bd5\u76ee\u6807\u6709\u5173\u7684\u5f85\u5b8c\u6210\u4efb\u52a1\u5217\u8868\u3002\u5927\u591a\u6570\u60c5\u51b5\u4e0b\uff0c\u4efb\u52a1\u4e2d\u4f1a\u63cf\u8ff0\u60a8\u5fc5\u987b\u4f7f\u7cfb\u7edf\u8fbe\u5230\u7684\u7279\u5b9a\u6700\u7ec8\u72b6\u6001\u3002\u5c06\u6839\u636e\u60a8\u7684\u7cfb\u7edf\u662f\u5426\u7b26\u5408\u6307\u5b9a\u6807\u51c6\u6765\u8bc4\u4f30\u60a8\u7684\u8003\u8bd5\u7ed3\u679c\u3002<\/p>\n \u8003\u8bd5\u671f\u95f4\u4e0d\u63d0\u4f9b\u4e92\u8054\u7f51\u63a5\u5165\uff0c\u60a8\u4e5f\u4e0d\u5f97\u5c06\u4efb\u4f55\u7eb8\u8d28\u6216\u7535\u5b50\u6587\u6863\u5e26\u5165\u8003\u573a\u3002\u7981\u6b62\u643a\u5e26\u7684\u7269\u54c1\u5305\u62ec\uff1a\u7b14\u8bb0\u3001\u4e66\u7c4d\u6216\u4efb\u4f55\u5176\u4ed6\u6750\u6599\u3002\u5728\u53c2\u52a0\u5927\u591a\u6570\u8003\u8bd5\u65f6\uff0c\u60a8\u90fd\u53ef\u4ee5\u4f7f\u7528\u4ea7\u54c1\u968f\u9644\u7684\u6587\u6863\u3002<\/p>\n \u6210\u7ee9\u53ca\u516c\u5e03<\/strong><\/p>\n \u8003\u8bd5\u7684\u5b98\u65b9\u6210\u7ee9\u7531\u7ea2\u5e3d\u8ba4\u8bc1\u4e2d\u5fc3\u72ec\u5bb6\u516c\u5e03\u3002\u7ea2\u5e3d\u672a\u6388\u6743\u8003\u5b98\u6216\u57f9\u8bad\u5408\u4f5c\u4f19\u4f34\u76f4\u63a5\u5411\u8003\u751f\u516c\u5e03\u8003\u8bd5\u7ed3\u679c\u3002\u8003\u8bd5\u6210\u7ee9\u901a\u5e38\u4f1a\u5728 3 \u4e2a\u7f8e\u56fd\u5de5\u4f5c\u65e5\u5185\u516c\u5e03\u3002<\/p>\n \u516c\u5e03\u7684\u8003\u8bd5\u7ed3\u679c\u4e3a\u603b\u5206\u3002\u7ea2\u5e3d\u4e0d\u516c\u5e03\u5355\u4e2a\u9879\u76ee\u7684\u6210\u7ee9\uff0c\u4e5f\u4e0d\u4f1a\u5e94\u8003\u751f\u8981\u6c42\u63d0\u4f9b\u989d\u5916\u4fe1\u606f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":" \u8003\u8bd5\u6982\u8ff0 \u7ea2\u5e3d\u4f01\u4e1a Linux 8 \u7684\u7ea2\u5e3d\u8ba4\u8bc1\u5de5\u7a0b\u5e08\uff08RHCE\uff09\u8003\u8bd5\uff08EX294\uff09\u57fa\u4e8e\u5b9e\u9645\u64cd\u4f5c\u80fd\u529b\uff0c\u65e8\u5728\u8003\u6838\u60a8 […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[582],"tags":[],"class_list":["post-195734","post","type-post","status-publish","format-standard","hentry","category-exam"],"acf":[],"_links":{"self":[{"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/posts\/195734","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/comments?post=195734"}],"version-history":[{"count":1,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/posts\/195734\/revisions"}],"predecessor-version":[{"id":195735,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/posts\/195734\/revisions\/195735"}],"wp:attachment":[{"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/media?parent=195734"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/categories?post=195734"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/tags?post=195734"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n