SaltStack 触发网络服务

SaltStack to trigger webservices

我目前正在尝试 SaltStack,它似乎有一些很酷的功能。但是我错过了 Ansible 的一个模块:

在 SaltStack 中,什么是 Ansible 模块的等价物 "uri"?

Ansible 中的示例:

- name: using webservices
  uri:
    url: http://.../v1/method
    method: PUT
    body: {{ lookup('template', 'job.j2') }}
    body_format: json
    status_code: 201,409
    HEADER_Content-Type: "application/json"

您可以使用 http.query 模块。

例如:

http://example.com/restapi:
  http.query:
    - match: 'SUCCESS'
    - data_render: True
    - header_file: /tmp/headers.txt
    - header_render: True
    - cookies: True
    - persist_session: True