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

Not working with Vagrant + Ubuntu trusty #6

Closed
katcipis opened this issue Jan 20, 2015 · 3 comments
Closed

Not working with Vagrant + Ubuntu trusty #6

katcipis opened this issue Jan 20, 2015 · 3 comments

Comments

@katcipis
Copy link

I don't know if this is actually related to Vagrant, but since the build on Travis CI is passing I'm assuming that this is the difference that is breaking my provisioning.

I wanted to use Vagrant + ansible-role-jenkins to setup a Jenkins so I could do some tests with it. But sadly it is breaking on the Add Jenkins apt repository key task.

The error is:

failed: [default] => {"failed": true, "item": ""}
msg: Failed to validate the SSL certificate for jenkins-ci.org:443. Use validate_certs=no or make sure your managed systems have a valid CA certificate installed. Paths checked for this platform: /etc/ssl/certs, /etc/pki/ca-trust/extracted/pem, /etc/pki/tls/certs, /usr/share/ca-certificates/cacert.org, /etc/ansible

FATAL: all hosts have already failed -- aborting

I don't know why a certificate should be missing, I'm using a default ubuntu/trusty box. The whole project is here:

https://github.com/katcipis/jenkins-playground

I checked out the paths and there is a bunch of certificates there :-). Am I missing something ?

@jolexa
Copy link

jolexa commented Feb 20, 2015

I had the same problem until I updated the system and rebooted. I suppose to there is a command to run instead of rebooting.

@geerlingguy
Copy link
Owner

@katcipis - It might be out of date SSL certs or something. I'd try adding a task to update apt cache before running this role, maybe in pre_tasks:

- name: Update apt cache.
  apt: update_cache=yes cache_valid_time=3600

I haven't had any issues locally on CentOS 6 or Ubuntu 12.04/14.04 under Vagrant/VirtualBox.

@aallbrig
Copy link

aallbrig commented Oct 19, 2016

Facing this same problem. Output log:


PLAY [Jenkins] **************************************************************** 

GATHERING FACTS *************************************************************** 
ok: [127.0.0.1]

TASK: [flyapen.jenkins | Install python-software-properties] ****************** 
ok: [127.0.0.1]

TASK: [flyapen.jenkins | Install python-pycurl] ******************************* 
ok: [127.0.0.1]

TASK: [flyapen.jenkins | Add jenkins apt-key] ********************************* 
ok: [127.0.0.1]

TASK: [flyapen.jenkins | Add Jenkins repository] ****************************** 
ok: [127.0.0.1]

TASK: [flyapen.jenkins | Install dependencies] ******************************** 
ok: [127.0.0.1] => (item=openjdk-7-jre,openjdk-7-jdk,git,curl)

TASK: [flyapen.jenkins | Install Jenkins] ************************************* 
ok: [127.0.0.1]

TASK: [flyapen.jenkins | Configure Jenkins Port] ****************************** 
ok: [127.0.0.1]

TASK: [flyapen.jenkins | Restart jenkins now] ********************************* 
skipping: [127.0.0.1]

TASK: [flyapen.jenkins | Configure Jenkins Prefix] **************************** 
skipping: [127.0.0.1]

TASK: [flyapen.jenkins | Configure Jenkins E-mail] **************************** 
skipping: [127.0.0.1]

TASK: [flyapen.jenkins | 10s delay while starting Jenkins] ******************** 
skipping: [127.0.0.1]

TASK: [flyapen.jenkins | Create Jenkins CLI destination directory: /opt/jenkins] *** 
ok: [127.0.0.1]

TASK: [flyapen.jenkins | Get Jenkins CLI] ************************************* 
ok: [127.0.0.1]

TASK: [flyapen.jenkins | Get Jenkins updates] ********************************* 
failed: [127.0.0.1] => {"failed": true}
msg: SSL Certificate does not belong to updates.jenkins-ci.org.  Make sure the url has a certificate that belongs to it or use validate_certs=False (insecure)

FATAL: all hosts have already failed -- aborting

PLAY RECAP ******************************************************************** 
           to retry, use: --limit @/Users/aallbrig/site.retry

127.0.0.1                  : ok=10   changed=0    unreachable=0    failed=1   


I have Python 2.7.11 so it can't be that I'm running into the same problem as ICTO/ansible-jenkins#42 . Then again, I am on OSX and ansible is perhaps using the default python installed instead of respecting the brew package. Digging into this now.

dhs-shine pushed a commit to dhs-shine/ansible-role-jenkins that referenced this issue Oct 15, 2017
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

4 participants