Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - name: Add droplets to monitoring
- uri:
- url: "https://xxx.xxx:5665/v1/objects/hosts/{{ item.name }}"
- headers:
- Accept: "application/json"
- method: PUT
- user: ansible
- password: XXXXXXX
- body: '{ "templates": [ "generic-host" ], "attrs": { "address": "{{ item.droplet.ip_address }}", "check_command": "hostalive", "vars.os" : "Linux" } }'
- force_basic_auth: yes
- body_format: json
- validate_certs: False
- with_items: "{{droplet_details.results}}"
Add Comment
Please, Sign In to add comment