Hi ,
While installing jenkins using ansible , i got thhe error as below,
Job for jenkins.service failed because the control process exited with error code. See \"systemctl status jenkins.service\" and \"journalctl -xe\" for details.", "invoke-rc.d: initscript jenkins, action \"start\" failed.", "dpkg: error processing package jenkins (--configure):", " subprocess installed post-installation script returned error exit status 1", "Errors were encountered while processing:", " jenkins"]}
My playbook is,
---
- hosts: servers
remote_user: ubuntu
become: yes
tasks:
- name: install nginx is at the latest version
apt: name=nginx state=present
- name: install git is at the latest version
apt: name=git state=present
- name: install update
apt:
update_cache: yes
- name: add apt-key for
jenkins.io apt_key:
url: "
https://pkg.jenkins.io/debian-stable/jenkins.io.key"
state: present
- name: source list update
lineinfile:
dest: /etc/apt/sources.list.d/jenkins.list
create: yes
state: present
line: "deb
https://pkg.jenkins.io/debian binary/"
- name: install update
apt:
update_cache: yes
- name: install jenkins
apt: pkg=jenkins state=present
How can i overcome the issue?