Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

It's possible disable ssl validation from ansible.cfg for Ansible?

Tags:

ansible

I would like to disable SSL validation from the ansible.cfg configuration file.

Something similar that exists in the get_url module, but from the Ansible configuration file.

parameter : validate_certs: no

Example:

- name: Download JBoss without proxy
  get_url:
    url: "{{jboss_eap_7_3_4_download_url}}"
    url_username: "{{repo_user}}"
    url_password: "{{repo_token}}"
    dest: "{{jboss_archive}}"
    validate_certs: no        
#   ^-- something similar to this parameter
  when: proxy is not defined or proxy == None
like image 564
CE Imán Avatar asked Oct 28 '25 20:10

CE Imán


1 Answers

You cannot disable certification validation for all your tasks in ansible.cfg. This is because ansible.cfg is for configuring Ansible and each module has its own way of establishing HTTP connections.

You could however use module_defaults to have validate_certs: false be applied to all get_url tasks.

like image 66
EnormousButterfly Avatar answered Oct 31 '25 11:10

EnormousButterfly



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!