You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
863 B
45 lines
863 B
3 years ago
|
---
|
||
|
|
||
|
- name: Install requiered
|
||
|
apt:
|
||
|
name: openjdk-11-jre
|
||
|
state: latest
|
||
|
tags: jenkins
|
||
|
|
||
|
- name: Install nginx
|
||
|
apt:
|
||
|
name: nginx
|
||
|
state: latest
|
||
|
tags: jenkins
|
||
|
|
||
|
- name: Deploy nginx conf
|
||
|
template: src=nginx.conf.j2 dest=/etc/nginx/ansible_conf.d/jenkins.conf
|
||
|
notify: reload nginx
|
||
|
tags: jenkins
|
||
|
|
||
|
- name: Download jenkins
|
||
|
get_url:
|
||
|
url: "{{ jenkins_war_url }}"
|
||
|
dest: "{{ jenkins_root_dir }}"
|
||
|
checksum: "sha256:{{ jenkins_war_sha256 }}"
|
||
|
validate_certs: no
|
||
|
tags: jenkins
|
||
|
|
||
|
- name: Deploy systemd unit
|
||
|
template: src=jenkins.service.j2 dest=/etc/systemd/system/jenkins.service
|
||
|
notify: Reload systemd
|
||
|
tags: jenkins
|
||
|
|
||
|
- name: Flush handlers
|
||
|
meta: flush_handlers
|
||
|
tags: jenkins
|
||
|
|
||
|
- name: Enable & start service jenkins
|
||
|
systemd:
|
||
|
name: jenkins
|
||
|
enabled: yes
|
||
|
masked: no
|
||
|
state: started
|
||
|
notify: start jenkins
|
||
|
|