
# check web functionality
#
- name: Set URL facts
  set_fact:
    main_url: "https://{{ ansible_default_ipv4.address }}{{ url_suffix }}"
    problems_url: "https://{{ ansible_default_ipv4.address }}{{ url_suffix }}/problems/"

- name: check main
  uri:
    url: "{{ main_url }}"
    return_content: yes
    validate_certs: no
  register: uri_res
  check_mode: no
  delegate_to: localhost
  failed_when: "'ABRT' not in uri_res.content"

- name: fetch problems
  uri:
    url: "{{ problems_url }}"
    return_content: yes
    validate_certs: no
  register: uri_res
  check_mode: no
  delegate_to: localhost
  failed_when: "'State' not in uri_res.content"
