{"id":108370,"date":"2020-05-31T10:10:05","date_gmt":"2020-05-31T02:10:05","guid":{"rendered":"http:\/\/4563.org\/?p=108370"},"modified":"2020-05-31T10:10:05","modified_gmt":"2020-05-31T02:10:05","slug":"ansible-playbook-%e9%80%9a%e8%bf%87%e5%b0%81%e8%a3%85-api-%e5%90%8e%e6%89%a7%e8%a1%8c%e6%97%a5%e5%bf%97%e9%97%ae%e9%a2%98%e8%af%b7%e6%95%99","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=108370","title":{"rendered":"ansible playbook \u901a\u8fc7\u5c01\u88c5 api \u540e\u6267\u884c\u65e5\u5fd7\u95ee\u9898\u8bf7\u6559"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  ansible playbook \u901a\u8fc7\u5c01\u88c5 api \u540e\u6267\u884c\u65e5\u5fd7\u95ee\u9898\u8bf7\u6559               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : fanne <\/span>  <span><i><\/i> 0<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<p>\u76ee\u524d\u5c01\u88c5\u4e86 ansible playbook api\uff0c\u6267\u884c playbook \u540e\u8fd4\u56de\u7ed3\u679c\u7c7b\u4f3c\u5982\u4e0b<\/p>\n<pre><code>  {     \"ok\": {         \"include_tasks\": \"OK\"     },     \"failed\": {         \"\u83b7\u53d6 XX \u4fe1\u606f[192.168.21.1]\": \"Unable to gather facts for non-existing VM \"     },     \"unreachable\": {},     \"skipped\": {},     \"status\": {},     \"programbug\": {},     \"virtual_ip\": \"192.168.21.1\",     \"task_id\": \"add_virtual-1590664169876\" } <\/code><\/pre>\n<p>\u73b0\u5728\u7684\u9700\u6c42\u662f\uff0c\u6839\u636e\u6267\u884c\u6bcf\u4e2a playbook\uff0c\u5199\u5165\u4e00\u4e2a log \u6587\u4ef6\uff0c\u5230\u65f6\u518d\u901a\u8fc7 websocket \u8fdb\u884c\u83b7\u53d6\u8fd9\u4e2a\u65e5\u5fd7\u6587\u4ef6\uff0c\u5b9e\u65f6\u518d\u524d\u7aef\u663e\u793a\u6bcf\u4e2a task \u7ed3\u679c\uff0c\u800c\u4e0d\u5fc5\u7b49\u5230\u5168\u90e8\u6267\u884c\u5b8c\u518d\u83b7\u53d6\u7ed3\u679c\uff0c\u56e0\u4e3a\u6709\u65f6\u5019\u4e00\u4e2a playbook \u5305\u542b\u4e86\u597d\u51e0\u4e2a task \u7684\u3002<\/p>\n<p>\u8981\u5b9e\u73b0\u8fd9\u4e2a\u529f\u80fd\u5e94\u8be5\u600e\u4e48\u641e\u6cd5\u3002<\/p>\n<p>\u6216\u8005\u5404\u4f4d\u5927\u4f6c\u5728\u5b9e\u73b0 django \u6267\u884c ansible playbook \u4efb\u52a1\u65f6\u5019\uff0c\u5b9e\u65f6\u8fd4\u56de\u6267\u884c\u4fe1\u606f\u5230\u524d\u7aef\u600e\u4e48\u641e\u7684\u3002<\/p>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>5<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"1806460\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Haujilo <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u5feb\u7cd9\u731b\u7684\u65b9\u6cd5\u5c31\u662f\u628a\u8fd9\u4e9b task \u7684 json \u65e5\u5fd7\u5bf9\u8c61\u5408\u5e76\u6210 json \u65e5\u5fd7\u5bf9\u8c61\u5217\u8868\u5b58\u50a8\u5728\u4e00\u4e2a SQL \u6570\u636e\u5e93\u7684 JSON field \u6216\u8005 mongo \u6216\u8005\u5176\u4ed6\u4f60\u559c\u6b22\u7684\u5b58\u50a8\uff0cplaybook \u8fd0\u884c\u8981\u6709\u72b6\u6001\uff0c\u7136\u540e\u524d\u7aef\u6839\u636e\u72b6\u6001\u5b9a\u65f6\u8f6e\u8bad\uff0c\u72b6\u6001\u4e3a\u7ed3\u675f\u5c31\u505c\u6b62\u8f6e\u8bad\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1806461\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Haujilo <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u6211\u4e4b\u524d\u505a\u8fc7\u4e00\u4e2a\uff0c\u7528\u6237\u91cf\u4e0d\u5927\uff0c\u8f6c\u5316\u6210 application\/json-seq \u7c7b\u578b\u76f4\u63a5\u5b58\u6210\u8fdb MongoDB \u7684 GridFS \u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1806462\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Firxiao <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u53ef\u4ee5\u53c2\u8003\u4e0b awx \u7684\u505a\u6cd5                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1806463\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : ericls <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4f60\u90fd\u6709 websocket \u4e86 \u4e3a\u4f55\u4e0d\u76f4\u63a5\u9001\u5230 websocket \u5462\uff1f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1806464\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : vanwtf <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u90fd\u7528 websocketl \u4e86,\u628a\u90a3\u4e2a Callback \u7c7b\u91cd\u5199\u4e00\u4e0b,\u521d\u59cb\u5316\u7684\u65f6\u5019\u628a\u4f60\u90a3\u4e2a\u8fde\u63a5\u5bf9\u8c61\u4f20\u8fdb\u53bb\uff0c\u5728\u89e6\u53d1\u8c03\u7528\u7684\u65f6\u5019\uff0c\u628a\u65e5\u5fd7\u53d1\u51fa\u53bb\u5c31\u884c\u554a,\u6211\u7528\u7684\u4e8b channels \u662f\u8fd9\u4e48\u5199\u7684                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>ansible playbook &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/108370"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=108370"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/108370\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=108370"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=108370"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=108370"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}