You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Splunk_Int/common/tasks/set_certificate_prefix.yml

18 lines
578 B

---
- name: "Test basic https endpoint"
uri:
url: "https://127.0.0.1:{{ splunk_svc_port }}/services/properties"
method: GET
user: "{{ splunk_admin_user }}"
password: "{{ splunk_password }}"
validate_certs: false
status_code: 200,404
timeout: 10
register: ssl_enabled
ignore_errors: true
# If the https call failed, we will revert to http and continue REST with normal error handling
- name: "Set url prefix for future REST calls"
set_fact:
cert_prefix: "{% if ssl_enabled.status == 200 %}https{% else %}http{% endif %}"