自定义module: health_check
检查 java 服务的健康状态
Requirements
Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required.
Role Variables
A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well.
Dependencies
A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles.
Example Playbook
# defaults file for java.healthy
# variables for health check
groups:
- java-gateway:
- name: 获取首页资源位
url: "http://127.0.0.1:8080/gateway/operations/api/v5/resource/home?app_version=6.7.0&gender=1,3&os_version=android8.0.0:ALP-AL00&client_type=android&yh_channel=1&uid=50892268&v=7&fromPage=iFP_Home&limit=100&session_key=bc8ff6db8cd0ab303cad58f225fe51df&business_line=yohobuy&screen_size=1080x1920&client_secret=64433041d137d825bc4536ba3ad3646a&page=1&physical_channel=1&udid=868035035832085db637f6cb043d7e0&content_code=9cb6138be8e60c96f48107da481816c2"
- java-order:
- name: 获取用户订单列表
url: "http://127.0.0.1:8084/order/orderInfo/getOrderList"
content-type: json
params: '{"uid": 10166061, "type": 1}'
- java-promotion:
- name: 获取用户现购码
url: "http://127.0.0.1:8085/promotion/limitcode/getLimitCode"
content-type: json
params: '{"uid":7677123,"limitProductCode":2016031421395612,"batchNo":20160316162754}'
- java-product:
- name: 获取商品详情
url: "http://127.0.0.1:8083/product/product/queryProductBasicInfo"
content-type: json
params: '{"param":439486}'
License
BSD
Author Information
An optional section for the role authors to include contact information, or a website (HTML is not allowed).