1
0
Fork 0
This repository has been archived on 2023-11-22. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
ansible-jenkins-php-v1/roles/jenkins-php-v1/tasks/main.yml
2020-01-17 23:35:15 +01:00

41 lines
1.4 KiB
YAML

---
# Usually, we only install Jenkins and let it live its life,
# so if it seems to be already installed, we skip this task.
- name: Check if /var/lib/jenkins exists
stat:
path: "{{ jenkins_home }}"
register: result
- name: No going further if jenkinsonlyinstall is set and Jenkins is already installed
set_fact:
gogogo: "{{ jenkins_installonly is undefined or jenkins_installonly == False or result.stat.isdir is undefined or result.stat.isdir == False }}"
- name: Warning about confidentiality
pause:
prompt: "Warning: this role will manage and display a lot of passwords and keys readable through the Ansible log and the process infos on each host. Sorry..."
seconds: 1 # TODO: 10
when: gogogo
# Pre-check
- include_tasks: roles/jenkins-php-v1/tasks/00_precheck.yml
when: gogogo
# Install Jenkins via the upstream repository
- include_tasks: roles/jenkins-php-v1/tasks/10_jenkins-repository.yml
when: gogogo
- include_tasks: roles/jenkins-php-v1/tasks/20_install-plugins.yml
when: gogogo
# At the moment, groups or roles are kinda overkill
# (but it probably will get back on us at the end...)
- include_tasks: roles/jenkins-php-v1/tasks/30_users.yml
when: gogogo
# Big configuration step : ACL, SSH keys aka. credentials, etc.
- include_tasks: roles/jenkins-php-v1/tasks/40_configure-jenkins.yml
when: gogogo
- include_tasks: roles/jenkins-php-v1/tasks/50_create-jobs.yml
when: gogogo