ansible-roles/jenkins/tasks/main.yml
Jérémy Lecour 7d08b0a30a
All checks were successful
continuous-integration/drone/push Build is passing
rename the tasks for embedded GPG keys
2021-05-06 11:33:19 +02:00

42 lines
901 B
YAML

---
## TODO: add those URLs or domains to the proxy whitelist
# http://pkg.jenkins-ci.org/.*
# http://mirrors.jenkins.io/.*
# http://jenkins.mirror.isppower.de/.*
- name: Look for /etc/apt/trusted.gpg
stat:
path: /etc/apt/trusted.gpg
register: apt_trusted_gpg
- name: Jenkins embedded GPG key is absent
apt_key:
id: "D50582E6"
state: absent
when: apt_trusted_gpg.stat.exists
- name: Add Jenkins GPG key
copy:
src: jenkins.asc
dest: /etc/apt/trusted.gpg.d/jenkins.asc
force: yes
mode: "0644"
- name: Add jenkins APT repository
apt_repository:
repo: deb http://pkg.jenkins-ci.org/debian-stable binary/
filename: jenkins
update_cache: yes
- name: Install Jenkins
apt:
name: jenkins
- name: Change Jenkins port
replace:
name: /etc/default/jenkins
regexp: "^HTTP_PORT=.*$"
replace: "HTTP_PORT=8081"
notify: Restart Jenkins