# Certificate validation fails within Vagrant

**URL:** <https://forum.ansible.com/t/certificate-validation-fails-within-vagrant/16741>\
**Category:** Ansible Project\
**Tags:** ubuntu\
**Created:** [November 11, 2014, 12:16am UTC](https://forum.ansible.com/t/certificate-validation-fails-within-vagrant/16741 "2014-11-11T00:16:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![benjamen.keroack](https://avatars.discourse-cdn.com/v4/letter/b/7993a0/32.png) [@benjamen.keroack](https://forum.ansible.com/u/benjamen.keroack)\
**Post date:** [November 11, 2014, 12:16am UTC](https://forum.ansible.com/t/certificate-validation-fails-within-vagrant/16741/1 "2014-11-11T00:16:43Z")

</div>

Hi,

I’m developing a testing environment for our Ansible playbooks using Vagrant. I’m using ansible 1.7.2 and vagrant 1.6.5.

When I execute a playbook, built-in modules fail SSL certificate validation:

- name: wget phantomjs  
action: get\_url  
args:  
url: “{{ phantomjs\_archive\_download\_url }}”  
dest: “{{ phantomjs\_archive\_download\_to }}”  
sha256sum: “{{ phantomsjs\_archive\_sha256\_checksum }}”  
sudo: yes

However if I replace with a manual shell command they work fine:

- name: wget phantomjs  
shell: wget {{ phantomjs\_archive\_download\_url }} -O “{{ phantomjs\_archive\_download\_to }}/{{ phantomjs\_archive\_name }}”  
sudo: yes

Both machines (the one running ansible-playbook and the controlled VM) are Ubuntu 14.04 and they both have the ca-certificates package installed.

Why would certificates validate successfully using any shell command (wget, httpie, curl, etc) but fail when using ansible modules?

Ben
