# issue #113: ensure CookieJar duplicate import issue does not reappear simply
# by exercisizng the uri package.

- name: regression/issue_113__duplicate_module_imports.yml
  hosts: test-targets
  tasks:

  - name: Get auth token
    uri:
      url: "http://127.0.0.1:14321/post"
      method: POST
      body: "client_id=admin-cli&username=admin&\
             password=keycloak_admin_password&grant_type=password"
      return_content: true
      validate_certs: false
    register: out
    ignore_errors: true

  - assert:
      that:
        - out.status == -1
        - out.url == 'http://127.0.0.1:14321/post'
      fail_msg: |
        out={{ out }}
  tags:
    - issue_113

