Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some steps don't skip certificate check #256

Open
NilsDeckert opened this issue Dec 20, 2024 · 0 comments
Open

Some steps don't skip certificate check #256

NilsDeckert opened this issue Dec 20, 2024 · 0 comments

Comments

@NilsDeckert
Copy link

SUMMARY

Creating a new realm on a keycloak instance with self-signed certificates fails with SSL: CERTIFICATE_VERIFY_FAILED.
Certificate checks are skipped in most steps, hence I assume that skipping and not skipping within the same task is not done on purpose.

ISSUE TYPE
  • Bug Report
ANSIBLE VERSION
ansible [core 2.18.0]
  config file = /home/nils/code/my_project/ansible-playbooks/ansible.cfg
  configured module search path = ['/home/nils/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.12/site-packages/ansible
  ansible collection location = /home/nils/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/bin/ansible
  python version = 3.12.7 (main, Oct  1 2024, 11:15:50) [GCC 14.2.1 20240910] (/usr/bin/python)
  jinja version = 3.1.4
  libyaml = True
COLLECTION VERSION
 /home/nils/.ansible/collections/ansible_collections
Collection                               Version
---------------------------------------- -------
fedora.linux_system_roles                1.93.0 
middleware_automation.common             1.2.2  
middleware_automation.keycloak           2.4.3  
nextcloud.admin                          2.0.0  
STEPS TO REPRODUCE
- name: Create a new realm
  hosts: keycloak
  remote_user: ansible
  become: true
  gather_facts: true

  roles:
    - role: middleware_automation.keycloak.keycloak_realm
      vars:
        keycloak_no_log: false
        keycloak_admin_user: "admin"
        keycloak_admin_password: "admin"
        keycloak_url: "https://{{ ansible_default_ipv4.address }}:8443"
        keycloak_context: ""
        keycloak_realm: "new-realm"
EXPECTED RESULTS

Creation of a new realm 'new-realm'.

ACTUAL RESULTS
TASK [middleware_automation.keycloak.keycloak_realm : Generate keycloak auth token] ***************************************************************************************************************************************************
ok: [123.123.123.123]

TASK [middleware_automation.keycloak.keycloak_realm : Determine if realm exists] ******************************************************************************************************************************************************
fatal: [123.123.123.123]: FAILED! => {"changed": false, "elapsed": 0, "msg": "Status code was -1 and not [200, 404]: Request failed: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate (_ssl.c:992)>", "redirected": false, "status": -1, "url": "https://123.123.123.123:8443/admin/realms/my-realm"}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant