{"id":158355,"date":"2019-09-27T09:02:31","date_gmt":"2019-09-27T01:02:31","guid":{"rendered":"https:\/\/lrxjmw.cn\/?p=158355"},"modified":"2019-09-17T13:16:40","modified_gmt":"2019-09-17T05:16:40","slug":"ansible-help-you","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/ansible-help-you.html","title":{"rendered":"\u65e5\u5e38\u7684\u8fd0\u7ef4\u4e2dAnsible \u53ef\u4ee5\u5e2e\u52a9\u4f60\u4ec0\u4e48"},"content":{"rendered":"\n\n\n
\u5bfc\u8bfb<\/td>\n\u5728\u8fd9\u4e2a DevOps \u4e16\u754c\u4e2d\uff0c\u770b\u8d77\u6765\u5f00\u53d1\uff08Dev\uff09\u8fd9\u4e00\u534a\u6210\u4e3a\u4e86\u5173\u6ce8\u7684\u7126\u70b9\uff0c\u800c\u8fd0\u7ef4\uff08Ops\uff09\u5219\u662f\u8fd9\u4e2a\u5173\u7cfb\u4e2d\u88ab\u9057\u5fd8\u7684\u53e6\u4e00\u534a\u3002\u8fd9\u51e0\u4e4e\u5c31\u597d\u50cf\u662f\u9886\u5934\u7684\u5f00\u53d1\u544a\u8bc9\u5c3e\u968f\u7684\u8fd0\u7ef4\u505a\u4ec0\u4e48\uff0c\u51e0\u4e4e\u6240\u6709\u7684\u201c\u8fd0\u7ef4\u201d\u90fd\u662f\u5f00\u53d1\u8bf4\u8981\u505a\u7684\u3002\u56e0\u6b64\uff0c\u8fd0\u7ef4\u88ab\u629b\u5230\u540e\u9762\uff0c\u964d\u7ea7\u5230\u4e86\u66ff\u8865\u5e2d\u4e0a\u3002\u6211\u60f3\u770b\u5230\u66f4\u591a\u7684 OpsDev\u3002\u56e0\u6b64\uff0c\u8ba9\u6211\u4eec\u6765\u770b\u770b Ansible \u5728\u65e5\u5e38\u7684\u8fd0\u7ef4\u4e2d\u53ef\u4ee5\u5e2e\u52a9\u4f60\u4ec0\u4e48\u3002<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

\"\"<\/p>\n

\u6211\u9009\u62e9\u5728 Ansible Tower \u4e2d\u5c55\u793a\u8fd9\u4e9b\u65b9\u6848\uff0c\u56e0\u4e3a\u6211\u8ba4\u4e3a\u7528\u6237\u754c\u9762 \uff08UI\uff09 \u53ef\u4ee5\u589e\u8272\u5927\u591a\u6570\u7684\u4efb\u52a1\u3002\u5982\u679c\u4f60\u60f3\u6a21\u62df\u6d4b\u8bd5\uff0c\u4f60\u53ef\u4ee5\u5728 Tower \u7684\u4e0a\u6e38\u5f00\u6e90\u7248\u672c AWX \u4e2d\u6d4b\u8bd5\u5b83\u3002<\/p>\n

\u7ba1\u7406\u7528\u6237<\/strong><\/div>\n

\u5728\u5927\u89c4\u6a21\u73af\u5883\u4e2d\uff0c\u4f60\u7684\u7528\u6237\u5c06\u96c6\u4e2d\u5728\u6d3b\u52a8\u76ee\u5f55\u6216 LDAP \u7b49\u7cfb\u7edf\u4e2d\u3002\u4f46\u6211\u6562\u6253\u8d4c\uff0c\u4ecd\u7136\u5b58\u5728\u8bb8\u591a\u5305\u542b\u5927\u91cf\u7684\u9759\u6001\u7528\u6237\u7684\u5168\u8d1f\u8377\u73af\u5883\u3002Ansible \u53ef\u4ee5\u5e2e\u52a9\u4f60\u5c06\u8fd9\u4e9b\u5206\u6563\u7684\u73af\u5883\u96c6\u4e2d\u5230\u4e00\u8d77\u3002\u793e\u533a\u5df2\u4e3a\u6211\u4eec\u89e3\u51b3\u4e86\u8fd9\u4e2a\u95ee\u9898\u3002\u770b\u770b Ansible Galaxy \u4e2d\u7684 users \u89d2\u8272\u3002<\/p>\n

\u8fd9\u4e2a\u89d2\u8272\u7684\u806a\u660e\u4e4b\u5904\u5728\u4e8e\u5b83\u5141\u8bb8\u6211\u4eec\u901a\u8fc7\u6570\u636e\u7ba1\u7406\u7528\u6237\uff0c\u800c\u65e0\u9700\u66f4\u6539\u8fd0\u884c\u903b\u8f91\u3002<\/p>\n

\"\"<\/p>\n

\u901a\u8fc7\u7b80\u5355\u7684\u6570\u636e\u7ed3\u6784\uff0c\u6211\u4eec\u53ef\u4ee5\u5728\u7cfb\u7edf\u4e0a\u6dfb\u52a0\u3001\u5220\u9664\u548c\u4fee\u6539\u9759\u6001\u7528\u6237\u3002\u8fd9\u5f88\u6709\u7528\u3002<\/p>\n

\u7ba1\u7406 sudo<\/strong><\/div>\n

\u63d0\u6743\u6709\u591a\u79cd\u5f62\u5f0f\uff0c\u4f46\u6700\u6d41\u884c\u7684\u662f sudo\u3002\u901a\u8fc7\u6bcf\u4e2a user\u3001group \u7b49\u79bb\u6563\u6587\u4ef6\u6765\u7ba1\u7406 sudo \u76f8\u5bf9\u5bb9\u6613\u3002\u4f46\u4e00\u4e9b\u4eba\u5bf9\u7ed9\u4e88\u7279\u6743\u611f\u5230\u7d27\u5f20\uff0c\u5e76\u503e\u5411\u4e8e\u6709\u65f6\u9650\u5730\u7ed9\u4e88\u63d0\u6743\u3002\u56e0\u6b64\u4e0b\u9762\u662f\u4e00\u79cd\u65b9\u6848\uff0c\u5b83\u4f7f\u7528\u7b80\u5355\u7684 at \u547d\u4ee4\u5bf9\u6388\u6743\u8bbf\u95ee\u8bbe\u7f6e\u65f6\u95f4\u9650\u5236\u3002<\/p>\n

\"\"<\/p>\n

\u7ba1\u7406\u670d\u52a1<\/strong><\/div>\n

\u7ed9\u5165\u95e8\u7ea7\u8fd0\u7ef4\u56e2\u961f\u63d0\u4f9b\u83dc\u5355\u4ee5\u4fbf\u4ed6\u4eec\u53ef\u4ee5\u91cd\u542f\u67d0\u4e9b\u670d\u52a1\u4e0d\u662f\u5f88\u597d\u5417\uff1f\u770b\u4e0b\u9762\uff01<\/p>\n

\"\"<\/p>\n

\u7ba1\u7406\u78c1\u76d8\u7a7a\u95f4<\/strong><\/div>\n

\u8fd9\u6709\u4e00\u4e2a\u7b80\u5355\u7684\u89d2\u8272\uff0c\u53ef\u5728\u7279\u5b9a\u76ee\u5f55\u4e2d\u67e5\u627e\u5b57\u8282\u5927\u4e8e\u67d0\u4e2a\u5927\u5c0f\u7684\u6587\u4ef6\u3002\u5728 Tower \u4e2d\u8fd9\u4e48\u505a\u65f6\uff0c\u542f\u7528\u56de\u8c03\u6709\u989d\u5916\u7684\u597d\u5904\u3002\u60f3\u8c61\u4e00\u4e0b\uff0c\u4f60\u7684\u76d1\u63a7\u65b9\u6848\u53d1\u73b0\u6587\u4ef6\u7cfb\u7edf\u5df2\u8d85\u8fc7 X\uff05 \u5e76\u89e6\u53d1 Tower \u4e2d\u7684\u4efb\u52a1\u4ee5\u627e\u51fa\u662f\u4ec0\u4e48\u6587\u4ef6\u5bfc\u81f4\u7684\u3002<\/p>\n

\"\"<\/p>\n

\u8c03\u8bd5\u7cfb\u7edf\u6027\u80fd\u95ee\u9898<\/strong><\/div>\n

\u8fd9\u4e2a\u89d2\u8272\u76f8\u5f53\u7b80\u5355\uff1a\u5b83\u8fd0\u884c\u4e00\u4e9b\u547d\u4ee4\u5e76\u6253\u5370\u8f93\u51fa\u3002\u7ec6\u8282\u5728\u6700\u540e\u8f93\u51fa\uff0c\u8ba9\u4f60 \u2014\u2014 \u7cfb\u7edf\u7ba1\u7406\u5458\u5feb\u901f\u6d4f\u89c8\u4e00\u773c\u3002\u53e6\u5916\u53ef\u4ee5\u4f7f\u7528 \u6b63\u5219\u8868\u8fbe\u5f0f \u5728\u8f93\u51fa\u4e2d\u627e\u5230\u67d0\u4e9b\u6761\u4ef6\uff08\u6bd4\u5982\u8bf4 CPU \u5360\u7528\u7387\u8d85\u8fc7 80\uff05\uff09\u3002<\/p>\n

\"\"<\/p>\n

\u6211\u5df2\u7ecf\u5f55\u5236\u4e86\u8fd9\u4e94\u4e2a\u4efb\u52a1\u7684\u7b80\u77ed\u89c6\u9891\u3002\u4f60\u4e5f\u53ef\u4ee5\u5728 Github \u4e0a\u627e\u5230\u6240\u6709\u4ee3\u7801\uff01\"https:\/\/github.com\/phips\/ansible-demos\"<\/p>\n


\n

via: https:\/\/linux.cn\/article-11312-1.html<\/a><\/p>\n

\u4f5c\u8005\uff1aMark Phillips \u8bd1\u8005\uff1ageekpi \u6821\u5bf9\uff1awxy<\/p>\n

\u672c\u6587\u7531 LCTT<\/a> \u539f\u521b\u7ffb\u8bd1\uff0cLinux\u4e2d\u56fd<\/a> \u8363\u8a89\u63a8\u51fa<\/p>\n","protected":false},"excerpt":{"rendered":"

\u6211\u9009\u62e9\u5728 Ansible Tower \u4e2d\u5c55\u793a\u8fd9\u4e9b\u65b9\u6848\uff0c\u56e0\u4e3a\u6211\u8ba4\u4e3a\u7528\u6237\u754c\u9762 \uff08UI\uff09 \u53ef\u4ee5\u589e\u8272\u5927\u591a\u6570\u7684\u4efb\u52a1\u3002\u5982\u679c […]<\/p>\n","protected":false},"author":310,"featured_media":158366,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-158355","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/158355","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/310"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=158355"}],"version-history":[{"count":5,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/158355\/revisions"}],"predecessor-version":[{"id":158367,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/158355\/revisions\/158367"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/158366"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=158355"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=158355"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=158355"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}