---

# check functionality

- meta: flush_handlers

- name: Set settings_url fact
  set_fact:
    settings_url: "https://{{ hostname }}/settings"

- name: fetch settings
  uri:
    url: "{{ settings_url }}"
    return_content: yes
    validate_certs: no
  register: uri_res
  check_mode: no
  delegate_to: localhost

- name: Fail if /settings does not contain supported_releases
  fail: msg="{{ settings_url }} doesn't contain supported_releases"
  when:
    "'supported_releases' not in uri_res.content"
