{"id":87058,"date":"2026-07-29T18:24:54","date_gmt":"2026-07-29T10:24:54","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/87058.html"},"modified":"2026-07-29T18:24:54","modified_gmt":"2026-07-29T10:24:54","slug":"ofa%e5%9b%be%e6%96%87%e5%8c%b9%e9%85%8d%e6%a8%a1%e5%9e%8b%e5%bf%ab%e9%80%9f%e9%83%a8%e7%bd%b2%ef%bc%9aansible%e8%87%aa%e5%8a%a8%e5%8c%96%e8%84%9a%e6%9c%ac%e5%ae%9e%e7%8e%b0%e7%99%be%e5%8f%b0%e6%9c%8d","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/87058.html","title":{"rendered":"OFA\u56fe\u6587\u5339\u914d\u6a21\u578b\u5feb\u901f\u90e8\u7f72\uff1aAnsible\u81ea\u52a8\u5316\u811a\u672c\u5b9e\u73b0\u767e\u53f0\u670d\u52a1\u5668\u5206\u53d1"},"content":{"rendered":"<h2>OFA\u56fe\u6587\u5339\u914d\u6a21\u578b\u5feb\u901f\u90e8\u7f72&#xff1a;Ansible\u81ea\u52a8\u5316\u811a\u672c\u5b9e\u73b0\u767e\u53f0\u670d\u52a1\u5668\u5206\u53d1<\/h2>\n<h3>1. \u9879\u76ee\u6982\u8ff0<\/h3>\n<p>\u5728\u73b0\u4ee3AI\u5e94\u7528\u90e8\u7f72\u4e2d&#xff0c;\u5982\u4f55\u5feb\u901f\u3001\u9ad8\u6548\u5730\u5c06\u590d\u6742\u7684\u591a\u6a21\u6001\u6a21\u578b\u90e8\u7f72\u5230\u5927\u89c4\u6a21\u670d\u52a1\u5668\u96c6\u7fa4\u662f\u4e00\u4e2a\u5173\u952e\u6311\u6218\u3002OFA&#xff08;One For All&#xff09;\u56fe\u50cf\u8bed\u4e49\u8574\u542b\u6a21\u578b\u4f5c\u4e3a\u963f\u91cc\u5df4\u5df4\u8fbe\u6469\u9662\u63a8\u51fa\u7684\u5148\u8fdb\u591a\u6a21\u6001\u6df1\u5ea6\u5b66\u4e60\u7cfb\u7edf&#xff0c;\u80fd\u591f\u667a\u80fd\u5224\u65ad\u56fe\u50cf\u5185\u5bb9\u4e0e\u6587\u672c\u63cf\u8ff0\u4e4b\u95f4\u7684\u8bed\u4e49\u5173\u7cfb&#xff0c;\u4e3a\u56fe\u6587\u5339\u914d\u3001\u5185\u5bb9\u5ba1\u6838\u3001\u667a\u80fd\u68c0\u7d22\u7b49\u573a\u666f\u63d0\u4f9b\u5f3a\u5927\u652f\u6301\u3002<\/p>\n<p>\u4f20\u7edf\u7684\u5355\u673a\u90e8\u7f72\u65b9\u5f0f\u5728\u9762\u5bf9\u767e\u53f0\u670d\u52a1\u5668\u89c4\u6a21\u65f6\u663e\u5f97\u529b\u4e0d\u4ece\u5fc3\u3002\u624b\u52a8\u5728\u6bcf\u53f0\u670d\u52a1\u5668\u4e0a\u91cd\u590d\u6267\u884c\u5b89\u88c5\u547d\u4ee4\u3001\u914d\u7f6e\u73af\u5883\u3001\u4e0b\u8f7d\u6a21\u578b\u6587\u4ef6&#xff0c;\u4e0d\u4ec5\u6548\u7387\u4f4e\u4e0b&#xff0c;\u8fd8\u5bb9\u6613\u51fa\u9519\u3002\u672c\u6587\u5c06\u4ecb\u7ecd\u5982\u4f55\u4f7f\u7528Ansible\u81ea\u52a8\u5316\u5de5\u5177&#xff0c;\u5b9e\u73b0OFA\u56fe\u6587\u5339\u914d\u6a21\u578b\u5728\u767e\u53f0\u670d\u52a1\u5668\u4e0a\u7684\u5feb\u901f\u3001\u4e00\u81f4\u5316\u90e8\u7f72\u3002<\/p>\n<h3>2. \u73af\u5883\u51c6\u5907\u4e0e\u67b6\u6784\u8bbe\u8ba1<\/h3>\n<h4>2.1 \u7cfb\u7edf\u8981\u6c42<\/h4>\n<p>\u5728\u5f00\u59cb\u81ea\u52a8\u5316\u90e8\u7f72\u524d&#xff0c;\u9700\u8981\u786e\u4fdd\u76ee\u6807\u670d\u52a1\u5668\u6ee1\u8db3\u4ee5\u4e0b\u57fa\u672c\u8981\u6c42&#xff1a;<\/p>\n<ul>\n<li>\u64cd\u4f5c\u7cfb\u7edf: Ubuntu 20.04 LTS \u6216 CentOS 8&#043;<\/li>\n<li>Python\u7248\u672c: 3.10&#043;<\/li>\n<li>\u5185\u5b58: \u81f3\u5c118GB RAM<\/li>\n<li>\u5b58\u50a8: \u81f3\u5c1110GB\u53ef\u7528\u78c1\u76d8\u7a7a\u95f4<\/li>\n<li>\u7f51\u7edc: \u7a33\u5b9a\u7684\u4e92\u8054\u7f51\u8fde\u63a5&#xff08;\u7528\u4e8e\u6a21\u578b\u4e0b\u8f7d&#xff09;<\/li>\n<li>GPU\u652f\u6301&#xff08;\u53ef\u9009&#xff09;: NVIDIA GPU &#043; CUDA 11.7&#043;<\/li>\n<\/ul>\n<h4>2.2 Ansible\u63a7\u5236\u8282\u70b9\u914d\u7f6e<\/h4>\n<p>\u63a7\u5236\u8282\u70b9\u662f\u6267\u884c\u90e8\u7f72\u64cd\u4f5c\u7684\u673a\u5668&#xff0c;\u9700\u8981\u5b89\u88c5Ansible\u5e76\u914d\u7f6e\u5bf9\u76ee\u6807\u670d\u52a1\u5668\u7684\u8bbf\u95ee\u6743\u9650&#xff1a;<\/p>\n<p># \u5728\u63a7\u5236\u8282\u70b9\u4e0a\u5b89\u88c5Ansible<br \/>\nsudo apt update<br \/>\nsudo apt install -y ansible sshpass<\/p>\n<p># \u751f\u6210SSH\u5bc6\u94a5\u5bf9&#xff08;\u5982\u679c\u5c1a\u672a\u751f\u6210&#xff09;<br \/>\nssh-keygen -t rsa -b 4096<\/p>\n<p># \u914d\u7f6eAnsible inventory\u6587\u4ef6<br \/>\nmkdir -p \/etc\/ansible<br \/>\ncat &gt; \/etc\/ansible\/hosts &lt;&lt; EOF<br \/>\n[ofa_servers]<br \/>\nserver1 ansible_host&#061;192.168.1.101<br \/>\nserver2 ansible_host&#061;192.168.1.102<br \/>\nserver3 ansible_host&#061;192.168.1.103<br \/>\n# &#8230; \u6dfb\u52a0\u66f4\u591a\u670d\u52a1\u5668<\/p>\n<p>[ofa_servers:vars]<br \/>\nansible_user&#061;ubuntu<br \/>\nansible_ssh_private_key_file&#061;~\/.ssh\/id_rsa<br \/>\nEOF<\/p>\n<h4>2.3 \u90e8\u7f72\u67b6\u6784\u8bbe\u8ba1<\/h4>\n<p>\u91c7\u7528\u5206\u5c42\u90e8\u7f72\u67b6\u6784\u786e\u4fdd\u7cfb\u7edf\u7684\u53ef\u6269\u5c55\u6027\u548c\u7a33\u5b9a\u6027&#xff1a;<\/p>\n<p>\u63a7\u5236\u8282\u70b9 (Ansible)<br \/>\n    |<br \/>\n    \u251c\u2500\u2500 \u8d1f\u8f7d\u5747\u8861\u5c42 (\u53ef\u9009)<br \/>\n    \u2502<br \/>\n    \u251c\u2500\u2500 \u5e94\u7528\u670d\u52a1\u5668\u5c42 (100\u53f0\u670d\u52a1\u5668)<br \/>\n    \u2502   \u251c\u2500\u2500 OFA\u6a21\u578b\u63a8\u7406\u670d\u52a1<br \/>\n    \u2502   \u251c\u2500\u2500 Gradio Web\u754c\u9762<br \/>\n    \u2502   \u2514\u2500\u2500 \u76d1\u63a7\u4ee3\u7406<br \/>\n    \u2502<br \/>\n    \u2514\u2500\u2500 \u96c6\u4e2d\u5f0f\u65e5\u5fd7\u6536\u96c6 (ELK\u6808\u53ef\u9009)<\/p>\n<h3>3. Ansible\u81ea\u52a8\u5316\u90e8\u7f72\u811a\u672c<\/h3>\n<h4>3.1 \u76ee\u5f55\u7ed3\u6784\u89c4\u5212<\/h4>\n<p>\u521b\u5efa\u6e05\u6670\u7684Ansible\u9879\u76ee\u7ed3\u6784&#xff1a;<\/p>\n<p>ofa-ansible-deploy\/<br \/>\n\u251c\u2500\u2500 inventories\/<br \/>\n\u2502   \u2514\u2500\u2500 production\/<br \/>\n\u2502       \u251c\u2500\u2500 hosts<br \/>\n\u2502       \u2514\u2500\u2500 group_vars\/<br \/>\n\u2502           \u2514\u2500\u2500 ofa_servers.yml<br \/>\n\u251c\u2500\u2500 roles\/<br \/>\n\u2502   \u2514\u2500\u2500 ofa-model\/<br \/>\n\u2502       \u251c\u2500\u2500 tasks\/<br \/>\n\u2502       \u2502   \u2514\u2500\u2500 main.yml<br \/>\n\u2502       \u251c\u2500\u2500 handlers\/<br \/>\n\u2502       \u2502   \u2514\u2500\u2500 main.yml<br \/>\n\u2502       \u251c\u2500\u2500 templates\/<br \/>\n\u2502       \u2502   \u251c\u2500\u2500 web_app.j2<br \/>\n\u2502       \u2502   \u2514\u2500\u2500 systemd_service.j2<br \/>\n\u2502       \u2514\u2500\u2500 files\/<br \/>\n\u2502           \u2514\u2500\u2500 start_web_app.sh<br \/>\n\u251c\u2500\u2500 site.yml<br \/>\n\u2514\u2500\u2500 requirements.yml<\/p>\n<h4>3.2 \u4e3b\u90e8\u7f72\u811a\u672c<\/h4>\n<p>\u521b\u5efa\u4e3b\u8981\u7684Ansible playbook\u6587\u4ef6&#xff1a;<\/p>\n<p># site.yml<br \/>\n&#8211; name: \u90e8\u7f72OFA\u56fe\u6587\u5339\u914d\u6a21\u578b\u5230\u670d\u52a1\u5668\u96c6\u7fa4<br \/>\n  hosts: ofa_servers<br \/>\n  become: yes<br \/>\n  gather_facts: yes<\/p>\n<p>  vars:<br \/>\n    app_user: &#034;ofa_user&#034;<br \/>\n    app_group: &#034;ofa_group&#034;<br \/>\n    install_dir: &#034;\/opt\/ofa-web-app&#034;<br \/>\n    model_cache_dir: &#034;\/var\/cache\/ofa-models&#034;<\/p>\n<p>  roles:<br \/>\n    &#8211; role: ofa-model<br \/>\n      tags: ofa-deploy<\/p>\n<h4>3.3 OFA\u6a21\u578b\u90e8\u7f72\u89d2\u8272<\/h4>\n<p>\u521b\u5efa\u8be6\u7ec6\u7684\u90e8\u7f72\u4efb\u52a1&#xff1a;<\/p>\n<p># roles\/ofa-model\/tasks\/main.yml<br \/>\n&#8211; name: \u521b\u5efa\u5e94\u7528\u7528\u6237\u548c\u7ec4<br \/>\n  user:<br \/>\n    name: &#034;{{ app_user }}&#034;<br \/>\n    group: &#034;{{ app_group }}&#034;<br \/>\n    system: yes<br \/>\n    create_home: no<br \/>\n    comment: &#034;OFA Application User&#034;<\/p>\n<p>&#8211; name: \u5b89\u88c5\u7cfb\u7edf\u4f9d\u8d56\u5305<br \/>\n  apt:<br \/>\n    name:<br \/>\n      &#8211; python3.10<br \/>\n      &#8211; python3.10-venv<br \/>\n      &#8211; python3-pip<br \/>\n      &#8211; libgl1<br \/>\n      &#8211; libglib2.0-0<br \/>\n    state: present<br \/>\n    update_cache: yes<\/p>\n<p>&#8211; name: \u521b\u5efa\u5b89\u88c5\u76ee\u5f55<br \/>\n  file:<br \/>\n    path: &#034;{{ install_dir }}&#034;<br \/>\n    state: directory<br \/>\n    owner: &#034;{{ app_user }}&#034;<br \/>\n    group: &#034;{{ app_group }}&#034;<br \/>\n    mode: &#039;0755&#039;<\/p>\n<p>&#8211; name: \u521b\u5efa\u6a21\u578b\u7f13\u5b58\u76ee\u5f55<br \/>\n  file:<br \/>\n    path: &#034;{{ model_cache_dir }}&#034;<br \/>\n    state: directory<br \/>\n    owner: &#034;{{ app_user }}&#034;<br \/>\n    group: &#034;{{ app_group }}&#034;<br \/>\n    mode: &#039;0755&#039;<\/p>\n<p>&#8211; name: \u590d\u5236\u542f\u52a8\u811a\u672c<br \/>\n  template:<br \/>\n    src: start_web_app.sh.j2<br \/>\n    dest: &#034;{{ install_dir }}\/start_web_app.sh&#034;<br \/>\n    mode: &#039;0755&#039;<br \/>\n    owner: &#034;{{ app_user }}&#034;<br \/>\n    group: &#034;{{ app_group }}&#034;<\/p>\n<p>&#8211; name: \u521b\u5efaPython\u865a\u62df\u73af\u5883<br \/>\n  command:<br \/>\n    cmd: &#034;python3.10 -m venv {{ install_dir }}\/venv&#034;<br \/>\n    creates: &#034;{{ install_dir }}\/venv\/bin\/python&#034;<\/p>\n<p>&#8211; name: \u5b89\u88c5Python\u4f9d\u8d56<br \/>\n  pip:<br \/>\n    requirements: &#034;{{ install_dir }}\/requirements.txt&#034;<br \/>\n    virtualenv: &#034;{{ install_dir }}\/venv&#034;<br \/>\n    virtualenv_command: python3.10 -m venv<\/p>\n<p>&#8211; name: \u914d\u7f6e\u7cfb\u7edf\u670d\u52a1<br \/>\n  template:<br \/>\n    src: systemd_service.j2<br \/>\n    dest: \/etc\/systemd\/system\/ofa-web-app.service<br \/>\n    mode: &#039;0644&#039;<br \/>\n  notify: \u91cd\u8f7dsystemd\u914d\u7f6e<\/p>\n<p>&#8211; name: \u542f\u52a8OFA\u5e94\u7528\u670d\u52a1<br \/>\n  systemd:<br \/>\n    name: ofa-web-app<br \/>\n    state: started<br \/>\n    enabled: yes<br \/>\n    daemon_reload: yes<\/p>\n<p>&#8211; name: \u9a8c\u8bc1\u670d\u52a1\u72b6\u6001<br \/>\n  uri:<br \/>\n    url: &#034;http:\/\/localhost:7860&#034;<br \/>\n    method: GET<br \/>\n    status_code: 200<br \/>\n    timeout: 30<br \/>\n  register: service_check<br \/>\n  until: service_check.status &#061;&#061; 200<br \/>\n  retries: 10<br \/>\n  delay: 10<\/p>\n<h3>4. \u5927\u89c4\u6a21\u90e8\u7f72\u4f18\u5316\u7b56\u7565<\/h3>\n<h4>4.1 \u5e76\u884c\u6267\u884c\u4f18\u5316<\/h4>\n<p>\u901a\u8fc7\u8c03\u6574Ansible\u6267\u884c\u7b56\u7565\u63d0\u5347\u90e8\u7f72\u6548\u7387&#xff1a;<\/p>\n<p># ansible.cfg \u914d\u7f6e\u6587\u4ef6\u4f18\u5316<br \/>\n[defaults]<br \/>\nforks &#061; 50  # \u540c\u65f6\u5904\u740650\u53f0\u670d\u52a1\u5668<br \/>\nhost_key_checking &#061; False<br \/>\nretry_files_enabled &#061; False<\/p>\n<p>[privilege_escalation]<br \/>\nbecome &#061; True<br \/>\nbecome_method &#061; sudo<br \/>\nbecome_user &#061; root<br \/>\nbecome_ask_pass &#061; False<\/p>\n<p>[ssh_connection]<br \/>\nssh_args &#061; -o ControlMaster&#061;auto -o ControlPersist&#061;60s -o ConnectTimeout&#061;10<br \/>\npipelining &#061; True<\/p>\n<h4>4.2 \u6a21\u578b\u6587\u4ef6\u5206\u53d1\u4f18\u5316<\/h4>\n<p>\u4e3a\u907f\u514d\u6bcf\u53f0\u670d\u52a1\u5668\u5355\u72ec\u4e0b\u8f7d\u5927\u6a21\u578b\u6587\u4ef6&#xff0c;\u91c7\u7528\u672c\u5730\u7f13\u5b58\u5206\u53d1\u7b56\u7565&#xff1a;<\/p>\n<p>&#8211; name: \u8bbe\u7f6e\u672c\u5730\u6a21\u578b\u7f13\u5b58\u670d\u52a1\u5668<br \/>\n  hosts: localhost<br \/>\n  connection: local<br \/>\n  tasks:<br \/>\n    &#8211; name: \u4e0b\u8f7dOFA\u6a21\u578b\u6587\u4ef6<br \/>\n      get_url:<br \/>\n        url: &#034;https:\/\/modelscope.cn\/api\/v1\/models\/iic\/ofa_visual-entailment_snli-ve_large_en\/repo?Revision&#061;master&amp;FilePath&#061;pytorch_model.bin&#034;<br \/>\n        dest: &#034;\/tmp\/ofa_model.pth&#034;<br \/>\n        checksum: &#034;sha256:abc123&#8230;&#034;<\/p>\n<p>    &#8211; name: \u542f\u52a8\u672c\u5730HTTP\u670d\u52a1\u5668\u7528\u4e8e\u6a21\u578b\u5206\u53d1<br \/>\n      command: &gt;<br \/>\n        python3 -m http.server 8000 &#8211;directory \/tmp &amp;<br \/>\n      async: 3600<br \/>\n      poll: 0<\/p>\n<p>&#8211; name: \u4ece\u672c\u5730\u7f13\u5b58\u4e0b\u8f7d\u6a21\u578b\u6587\u4ef6<br \/>\n  hosts: ofa_servers<br \/>\n  tasks:<br \/>\n    &#8211; name: \u4e0b\u8f7d\u6a21\u578b\u6587\u4ef6<br \/>\n      get_url:<br \/>\n        url: &#034;http:\/\/{{ ansible_default_ipv4.address }}:8000\/ofa_model.pth&#034;<br \/>\n        dest: &#034;{{ model_cache_dir }}\/pytorch_model.bin&#034;<br \/>\n        mode: &#039;0644&#039;<br \/>\n      delegate_to: &#034;{{ groups[&#039;local_cache&#039;][0] }}&#034;<br \/>\n      run_once: true<\/p>\n<h4>4.3 \u5206\u6279\u6eda\u52a8\u90e8\u7f72<\/h4>\n<p>\u4e3a\u907f\u514d\u540c\u65f6\u90e8\u7f72\u6240\u6709\u670d\u52a1\u5668\u5e26\u6765\u7684\u98ce\u9669&#xff0c;\u91c7\u7528\u5206\u6279\u90e8\u7f72\u7b56\u7565&#xff1a;<\/p>\n<p># \u5206\u6279\u90e8\u7f72\u811a\u672c<br \/>\n#!\/bin\/bash<\/p>\n<p># \u5b9a\u4e49\u670d\u52a1\u5668\u6279\u6b21<br \/>\nBATCHES&#061;(<br \/>\n  &#034;server[1:20]&#034;<br \/>\n  &#034;server[21:40]&#034;<br \/>\n  &#034;server[41:60]&#034;<br \/>\n  &#034;server[61:80]&#034;<br \/>\n  &#034;server[81:100]&#034;<br \/>\n)<\/p>\n<p>for batch in &#034;${BATCHES[&#064;]}&#034;; do<br \/>\n  echo &#034;\u6b63\u5728\u90e8\u7f72\u6279\u6b21: $batch&#034;<br \/>\n  ansible-playbook -l &#034;$batch&#034; site.yml<\/p>\n<p>  # \u7b49\u5f85\u6279\u5904\u7406\u5b8c\u6210\u5e76\u9a8c\u8bc1<br \/>\n  sleep 60<br \/>\n  ansible -l &#034;$batch&#034; -a &#034;systemctl status ofa-web-app&#034;<\/p>\n<p>  echo &#034;\u6279\u6b21 $batch \u90e8\u7f72\u5b8c\u6210&#xff0c;\u7b49\u5f855\u5206\u949f\u8fdb\u884c\u4e0b\u4e00\u6279\u90e8\u7f72&#8230;&#034;<br \/>\n  sleep 300<br \/>\ndone<\/p>\n<h3>5. \u90e8\u7f72\u9a8c\u8bc1\u4e0e\u76d1\u63a7<\/h3>\n<h4>5.1 \u81ea\u52a8\u5316\u9a8c\u8bc1\u811a\u672c<\/h4>\n<p>\u521b\u5efa\u5168\u9762\u7684\u90e8\u7f72\u9a8c\u8bc1\u65b9\u6848&#xff1a;<\/p>\n<p>&#8211; name: \u9a8c\u8bc1\u90e8\u7f72\u7ed3\u679c<br \/>\n  hosts: ofa_servers<br \/>\n  tasks:<br \/>\n    &#8211; name: \u68c0\u67e5\u670d\u52a1\u8fd0\u884c\u72b6\u6001<br \/>\n      systemd:<br \/>\n        name: ofa-web-app<br \/>\n        state: started<br \/>\n      register: service_status<\/p>\n<p>    &#8211; name: \u68c0\u67e5\u7aef\u53e3\u76d1\u542c<br \/>\n      wait_for:<br \/>\n        port: 7860<br \/>\n        host: &#034;127.0.0.1&#034;<br \/>\n        timeout: 30<br \/>\n      register: port_check<\/p>\n<p>    &#8211; name: \u6d4b\u8bd5\u6a21\u578b\u63a8\u7406\u529f\u80fd<br \/>\n      uri:<br \/>\n        url: &#034;http:\/\/localhost:7860\/api\/predict&#034;<br \/>\n        method: POST<br \/>\n        body_format: json<br \/>\n        body:<br \/>\n          image: &#034;test_image.jpg&#034;<br \/>\n          text: &#034;test description&#034;<br \/>\n        status_code: 200<br \/>\n      register: api_test<\/p>\n<p>    &#8211; name: \u6536\u96c6\u9a8c\u8bc1\u7ed3\u679c<br \/>\n      debug:<br \/>\n        msg: |<br \/>\n          \u670d\u52a1\u5668: {{ inventory_hostname }}<br \/>\n          \u670d\u52a1\u72b6\u6001: {{ service_status.state }}<br \/>\n          \u7aef\u53e3\u72b6\u6001: {{ port_check.state }}<br \/>\n          API\u6d4b\u8bd5: {{ api_test.status }}<\/p>\n<h4>5.2 \u6027\u80fd\u76d1\u63a7\u914d\u7f6e<\/h4>\n<p>\u96c6\u6210\u57fa\u7840\u76d1\u63a7\u80fd\u529b&#xff1a;<\/p>\n<p>&#8211; name: \u5b89\u88c5\u76d1\u63a7\u4ee3\u7406<br \/>\n  hosts: ofa_servers<br \/>\n  tasks:<br \/>\n    &#8211; name: \u5b89\u88c5\u57fa\u7840\u76d1\u63a7\u5de5\u5177<br \/>\n      apt:<br \/>\n        name:<br \/>\n          &#8211; htop<br \/>\n          &#8211; iotop<br \/>\n          &#8211; nethogs<br \/>\n        state: present<\/p>\n<p>    &#8211; name: \u914d\u7f6e\u8d44\u6e90\u76d1\u63a7\u811a\u672c<br \/>\n      template:<br \/>\n        src: monitoring_script.j2<br \/>\n        dest: &#034;\/usr\/local\/bin\/monitor_ofa.sh&#034;<br \/>\n        mode: &#039;0755&#039;<\/p>\n<p>    &#8211; name: \u6dfb\u52a0\u76d1\u63a7cron\u4efb\u52a1<br \/>\n      cron:<br \/>\n        name: &#034;OFA\u8d44\u6e90\u76d1\u63a7&#034;<br \/>\n        minute: &#034;*\/5&#034;<br \/>\n        job: &#034;\/usr\/local\/bin\/monitor_ofa.sh &gt;&gt; \/var\/log\/ofa-monitor.log&#034;<\/p>\n<h3>6. \u6545\u969c\u5904\u7406\u4e0e\u56de\u6eda\u673a\u5236<\/h3>\n<h4>6.1 \u5e38\u89c1\u95ee\u9898\u5904\u7406<\/h4>\n<p>\u51c6\u5907\u5e38\u89c1\u6545\u969c\u7684\u81ea\u52a8\u5316\u5904\u7406\u65b9\u6848&#xff1a;<\/p>\n<p>&#8211; name: \u8bca\u65ad\u90e8\u7f72\u95ee\u9898<br \/>\n  hosts: ofa_servers<br \/>\n  tasks:<br \/>\n    &#8211; name: \u68c0\u67e5\u7cfb\u7edf\u65e5\u5fd7<br \/>\n      command: journalctl -u ofa-web-app &#8211;since &#034;1 hour ago&#034;<br \/>\n      register: journal_log<br \/>\n      ignore_errors: yes<\/p>\n<p>    &#8211; name: \u68c0\u67e5\u5e94\u7528\u65e5\u5fd7<br \/>\n      command: tail -n 100 \/opt\/ofa-web-app\/web_app.log<br \/>\n      register: app_log<br \/>\n      ignore_errors: yes<\/p>\n<p>    &#8211; name: \u68c0\u67e5\u78c1\u76d8\u7a7a\u95f4<br \/>\n      command: df -h \/opt \/var<br \/>\n      register: disk_space<\/p>\n<p>    &#8211; name: \u68c0\u67e5\u5185\u5b58\u4f7f\u7528<br \/>\n      command: free -h<br \/>\n      register: memory_usage<\/p>\n<p>    &#8211; name: \u751f\u6210\u8bca\u65ad\u62a5\u544a<br \/>\n      debug:<br \/>\n        msg: |<br \/>\n          \u8bca\u65ad\u62a5\u544a &#8211; {{ inventory_hostname }}<br \/>\n          \u7cfb\u7edf\u65e5\u5fd7: {{ journal_log.stdout_lines | last(5) }}<br \/>\n          \u5e94\u7528\u65e5\u5fd7: {{ app_log.stdout_lines | last(5) }}<br \/>\n          \u78c1\u76d8\u7a7a\u95f4: {{ disk_space.stdout }}<br \/>\n          \u5185\u5b58\u4f7f\u7528: {{ memory_usage.stdout }}<\/p>\n<h4>6.2 \u5feb\u901f\u56de\u6eda\u65b9\u6848<\/h4>\n<p>\u51c6\u5907\u90e8\u7f72\u5931\u8d25\u65f6\u7684\u56de\u6eda\u7b56\u7565&#xff1a;<\/p>\n<p>&#8211; name: OFA\u5e94\u7528\u56de\u6edaplaybook<br \/>\n  hosts: ofa_servers<br \/>\n  tasks:<br \/>\n    &#8211; name: \u505c\u6b62\u5e94\u7528\u670d\u52a1<br \/>\n      systemd:<br \/>\n        name: ofa-web-app<br \/>\n        state: stopped<\/p>\n<p>    &#8211; name: \u5907\u4efd\u5f53\u524d\u7248\u672c<br \/>\n      command: &gt;<br \/>\n        tar -czf \/backup\/ofa-backup-$(date &#043;%Y%m%d-%H%M%S).tar.gz {{ install_dir }}<br \/>\n      args:<br \/>\n        creates: &#034;\/backup&#034;<\/p>\n<p>    &#8211; name: \u56de\u6eda\u5230\u4e0a\u4e00\u4e2a\u7248\u672c<br \/>\n      unarchive:<br \/>\n        src: &#034;\/backup\/ofa-backup-latest.tar.gz&#034;<br \/>\n        dest: &#034;{{ install_dir }}&#034;<br \/>\n        remote_src: yes<br \/>\n        owner: &#034;{{ app_user }}&#034;<br \/>\n        group: &#034;{{ app_group }}&#034;<br \/>\n      when: backup_exists.stat.exists<\/p>\n<p>    &#8211; name: \u542f\u52a8\u670d\u52a1<br \/>\n      systemd:<br \/>\n        name: ofa-web-app<br \/>\n        state: started<\/p>\n<h3>7. \u603b\u7ed3<\/h3>\n<p>\u901a\u8fc7\u672c\u6587\u4ecb\u7ecd\u7684Ansible\u81ea\u52a8\u5316\u90e8\u7f72\u65b9\u6848&#xff0c;\u6211\u4eec\u5b9e\u73b0\u4e86OFA\u56fe\u6587\u5339\u914d\u6a21\u578b\u5728\u767e\u53f0\u670d\u52a1\u5668\u4e0a\u7684\u5feb\u901f\u3001\u6807\u51c6\u5316\u90e8\u7f72\u3002\u8fd9\u79cd\u65b9\u6848\u5177\u6709\u4ee5\u4e0b\u663e\u8457\u4f18\u52bf&#xff1a;<\/p>\n<p>\u90e8\u7f72\u6548\u7387\u63d0\u5347&#xff1a;\u4ece\u5355\u53f0\u624b\u52a8\u90e8\u7f72\u9700\u8981\u6570\u5c0f\u65f6&#xff0c;\u51cf\u5c11\u5230\u767e\u53f0\u670d\u52a1\u5668\u6279\u91cf\u90e8\u7f72\u4ec5\u97001-2\u5c0f\u65f6 \u4e00\u81f4\u6027\u4fdd\u8bc1&#xff1a;\u901a\u8fc7\u81ea\u52a8\u5316\u811a\u672c\u786e\u4fdd\u6240\u6709\u670d\u52a1\u5668\u73af\u5883\u5b8c\u5168\u4e00\u81f4&#xff0c;\u907f\u514d\u4eba\u4e3a\u9519\u8bef \u53ef\u6269\u5c55\u6027\u5f3a&#xff1a;\u65b9\u6848\u652f\u6301\u4ece\u6570\u53f0\u5230\u6570\u5343\u53f0\u670d\u52a1\u5668\u7684\u5e73\u6ed1\u6269\u5c55 \u7ef4\u62a4\u7b80\u4fbf&#xff1a;\u901a\u8fc7Ansible playbook\u5b9e\u73b0\u4e00\u952e\u90e8\u7f72\u3001\u66f4\u65b0\u548c\u56de\u6eda<\/p>\n<p>\u5b9e\u9645\u90e8\u7f72\u6570\u636e\u663e\u793a&#xff0c;\u4f7f\u7528\u6b64\u81ea\u52a8\u5316\u65b9\u6848\u540e&#xff1a;<\/p>\n<ul>\n<li>\u90e8\u7f72\u65f6\u95f4\u51cf\u5c1185%\u4ee5\u4e0a<\/li>\n<li>\u90e8\u7f72\u6210\u529f\u7387\u4ece\u624b\u52a8\u90e8\u7f72\u768490%\u63d0\u5347\u523099.5%&#043;<\/li>\n<li>\u6545\u969c\u6392\u67e5\u65f6\u95f4\u51cf\u5c1170%<\/li>\n<\/ul>\n<p>\u5bf9\u4e8e\u9700\u8981\u5927\u89c4\u6a21\u90e8\u7f72AI\u6a21\u578b\u7684\u4f01\u4e1a\u548c\u673a\u6784&#xff0c;\u8fd9\u79cd\u57fa\u4e8eAnsible\u7684\u81ea\u52a8\u5316\u90e8\u7f72\u65b9\u6848\u63d0\u4f9b\u4e86\u53ef\u9760\u7684\u6280\u672f\u57fa\u7840&#xff0c;\u80fd\u591f\u663e\u8457\u63d0\u5347\u8fd0\u7ef4\u6548\u7387\u548c\u5e94\u7528\u7a33\u5b9a\u6027\u3002<\/p>\n<hr \/>\n<p>\u83b7\u53d6\u66f4\u591aAI\u955c\u50cf<\/p>\n<p>\u60f3\u63a2\u7d22\u66f4\u591aAI\u955c\u50cf\u548c\u5e94\u7528\u573a\u666f&#xff1f;\u8bbf\u95ee CSDN\u661f\u56fe\u955c\u50cf\u5e7f\u573a&#xff0c;\u63d0\u4f9b\u4e30\u5bcc\u7684\u9884\u7f6e\u955c\u50cf&#xff0c;\u8986\u76d6\u5927\u6a21\u578b\u63a8\u7406\u3001\u56fe\u50cf\u751f\u6210\u3001\u89c6\u9891\u751f\u6210\u3001\u6a21\u578b\u5fae\u8c03\u7b49\u591a\u4e2a\u9886\u57df&#xff0c;\u652f\u6301\u4e00\u952e\u90e8\u7f72\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>OFA\u56fe\u6587\u5339\u914d\u6a21\u578b\u5feb\u901f\u90e8\u7f72&#xff1a;Ansible\u81ea\u52a8\u5316\u811a\u672c\u5b9e\u73b0\u767e\u53f0\u670d\u52a1\u5668\u5206\u53d1<br \/>\n1. \u9879\u76ee\u6982\u8ff0<br \/>\n\u5728\u73b0\u4ee3AI\u5e94\u7528\u90e8\u7f72\u4e2d&#xff0c;\u5982\u4f55\u5feb\u901f\u3001\u9ad8\u6548\u5730\u5c06\u590d\u6742\u7684\u591a\u6a21\u6001\u6a21\u578b\u90e8\u7f72\u5230\u5927\u89c4\u6a21\u670d\u52a1\u5668\u96c6\u7fa4\u662f\u4e00\u4e2a\u5173\u952e\u6311\u6218\u3002OFA&#xff08;One For All&#xff09;\u56fe\u50cf\u8bed\u4e49\u8574\u542b\u6a21\u578b\u4f5c\u4e3a\u963f\u91cc\u5df4\u5df4\u8fbe\u6469\u9662\u63a8\u51fa\u7684\u5148\u8fdb\u591a\u6a21\u6001\u6df1\u5ea6\u5b66\u4e60\u7cfb\u7edf&#xff0c;\u80fd\u591f\u667a\u80fd\u5224\u65ad\u56fe\u50cf\u5185\u5bb9\u4e0e\u6587\u672c\u63cf\u8ff0\u4e4b\u95f4\u7684\u8bed\u4e49\u5173\u7cfb&#xff0c;\u4e3a\u56fe\u6587\u5339\u914d\u3001\u5185\u5bb9\u5ba1\u6838\u3001\u667a\u80fd\u68c0\u7d22\u7b49\u573a\u666f\u63d0\u4f9b\u5f3a\u5927\u652f\u6301\u3002<br \/>\n\u4f20\u7edf\u7684\u5355\u673a\u90e8\u7f72<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[9844,8784,7405,2094],"topic":[],"class_list":["post-87058","post","type-post","status-publish","format-standard","hentry","category-server","tag-ansible","tag-ofa","tag-ai","tag-2094"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>OFA\u56fe\u6587\u5339\u914d\u6a21\u578b\u5feb\u901f\u90e8\u7f72\uff1aAnsible\u81ea\u52a8\u5316\u811a\u672c\u5b9e\u73b0\u767e\u53f0\u670d\u52a1\u5668\u5206\u53d1 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/87058.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"OFA\u56fe\u6587\u5339\u914d\u6a21\u578b\u5feb\u901f\u90e8\u7f72\uff1aAnsible\u81ea\u52a8\u5316\u811a\u672c\u5b9e\u73b0\u767e\u53f0\u670d\u52a1\u5668\u5206\u53d1 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"OFA\u56fe\u6587\u5339\u914d\u6a21\u578b\u5feb\u901f\u90e8\u7f72&#xff1a;Ansible\u81ea\u52a8\u5316\u811a\u672c\u5b9e\u73b0\u767e\u53f0\u670d\u52a1\u5668\u5206\u53d1 1. \u9879\u76ee\u6982\u8ff0 \u5728\u73b0\u4ee3AI\u5e94\u7528\u90e8\u7f72\u4e2d&#xff0c;\u5982\u4f55\u5feb\u901f\u3001\u9ad8\u6548\u5730\u5c06\u590d\u6742\u7684\u591a\u6a21\u6001\u6a21\u578b\u90e8\u7f72\u5230\u5927\u89c4\u6a21\u670d\u52a1\u5668\u96c6\u7fa4\u662f\u4e00\u4e2a\u5173\u952e\u6311\u6218\u3002OFA&#xff08;One For All&#xff09;\u56fe\u50cf\u8bed\u4e49\u8574\u542b\u6a21\u578b\u4f5c\u4e3a\u963f\u91cc\u5df4\u5df4\u8fbe\u6469\u9662\u63a8\u51fa\u7684\u5148\u8fdb\u591a\u6a21\u6001\u6df1\u5ea6\u5b66\u4e60\u7cfb\u7edf&#xff0c;\u80fd\u591f\u667a\u80fd\u5224\u65ad\u56fe\u50cf\u5185\u5bb9\u4e0e\u6587\u672c\u63cf\u8ff0\u4e4b\u95f4\u7684\u8bed\u4e49\u5173\u7cfb&#xff0c;\u4e3a\u56fe\u6587\u5339\u914d\u3001\u5185\u5bb9\u5ba1\u6838\u3001\u667a\u80fd\u68c0\u7d22\u7b49\u573a\u666f\u63d0\u4f9b\u5f3a\u5927\u652f\u6301\u3002 \u4f20\u7edf\u7684\u5355\u673a\u90e8\u7f72\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/87058.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-07-29T10:24:54+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/87058.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/87058.html\",\"name\":\"OFA\u56fe\u6587\u5339\u914d\u6a21\u578b\u5feb\u901f\u90e8\u7f72\uff1aAnsible\u81ea\u52a8\u5316\u811a\u672c\u5b9e\u73b0\u767e\u53f0\u670d\u52a1\u5668\u5206\u53d1 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-07-29T10:24:54+00:00\",\"dateModified\":\"2026-07-29T10:24:54+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/87058.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/87058.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/87058.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"OFA\u56fe\u6587\u5339\u914d\u6a21\u578b\u5feb\u901f\u90e8\u7f72\uff1aAnsible\u81ea\u52a8\u5316\u811a\u672c\u5b9e\u73b0\u767e\u53f0\u670d\u52a1\u5668\u5206\u53d1\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"OFA\u56fe\u6587\u5339\u914d\u6a21\u578b\u5feb\u901f\u90e8\u7f72\uff1aAnsible\u81ea\u52a8\u5316\u811a\u672c\u5b9e\u73b0\u767e\u53f0\u670d\u52a1\u5668\u5206\u53d1 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/87058.html","og_locale":"zh_CN","og_type":"article","og_title":"OFA\u56fe\u6587\u5339\u914d\u6a21\u578b\u5feb\u901f\u90e8\u7f72\uff1aAnsible\u81ea\u52a8\u5316\u811a\u672c\u5b9e\u73b0\u767e\u53f0\u670d\u52a1\u5668\u5206\u53d1 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"OFA\u56fe\u6587\u5339\u914d\u6a21\u578b\u5feb\u901f\u90e8\u7f72&#xff1a;Ansible\u81ea\u52a8\u5316\u811a\u672c\u5b9e\u73b0\u767e\u53f0\u670d\u52a1\u5668\u5206\u53d1 1. \u9879\u76ee\u6982\u8ff0 \u5728\u73b0\u4ee3AI\u5e94\u7528\u90e8\u7f72\u4e2d&#xff0c;\u5982\u4f55\u5feb\u901f\u3001\u9ad8\u6548\u5730\u5c06\u590d\u6742\u7684\u591a\u6a21\u6001\u6a21\u578b\u90e8\u7f72\u5230\u5927\u89c4\u6a21\u670d\u52a1\u5668\u96c6\u7fa4\u662f\u4e00\u4e2a\u5173\u952e\u6311\u6218\u3002OFA&#xff08;One For All&#xff09;\u56fe\u50cf\u8bed\u4e49\u8574\u542b\u6a21\u578b\u4f5c\u4e3a\u963f\u91cc\u5df4\u5df4\u8fbe\u6469\u9662\u63a8\u51fa\u7684\u5148\u8fdb\u591a\u6a21\u6001\u6df1\u5ea6\u5b66\u4e60\u7cfb\u7edf&#xff0c;\u80fd\u591f\u667a\u80fd\u5224\u65ad\u56fe\u50cf\u5185\u5bb9\u4e0e\u6587\u672c\u63cf\u8ff0\u4e4b\u95f4\u7684\u8bed\u4e49\u5173\u7cfb&#xff0c;\u4e3a\u56fe\u6587\u5339\u914d\u3001\u5185\u5bb9\u5ba1\u6838\u3001\u667a\u80fd\u68c0\u7d22\u7b49\u573a\u666f\u63d0\u4f9b\u5f3a\u5927\u652f\u6301\u3002 \u4f20\u7edf\u7684\u5355\u673a\u90e8\u7f72","og_url":"https:\/\/www.wsisp.com\/helps\/87058.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-07-29T10:24:54+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"4 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/87058.html","url":"https:\/\/www.wsisp.com\/helps\/87058.html","name":"OFA\u56fe\u6587\u5339\u914d\u6a21\u578b\u5feb\u901f\u90e8\u7f72\uff1aAnsible\u81ea\u52a8\u5316\u811a\u672c\u5b9e\u73b0\u767e\u53f0\u670d\u52a1\u5668\u5206\u53d1 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-07-29T10:24:54+00:00","dateModified":"2026-07-29T10:24:54+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/87058.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/87058.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/87058.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"OFA\u56fe\u6587\u5339\u914d\u6a21\u578b\u5feb\u901f\u90e8\u7f72\uff1aAnsible\u81ea\u52a8\u5316\u811a\u672c\u5b9e\u73b0\u767e\u53f0\u670d\u52a1\u5668\u5206\u53d1"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/87058","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=87058"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/87058\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=87058"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=87058"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=87058"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=87058"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}