From 12d4943e45529a9bfa0d2a77126a8b7f7256a9b7 Mon Sep 17 00:00:00 2001 From: Chl Date: Sat, 18 Jan 2020 23:09:54 +0100 Subject: [PATCH] cleanup jenkins_installonly `jenkins_installonly` was a residue of a bigger playbook this role was part of. Doesn't really feel clean and idempotent so I remove it. --- inventory.yml | 6 ------ roles/jenkins-php-v1/tasks/main.yml | 20 +------------------- 2 files changed, 1 insertion(+), 25 deletions(-) diff --git a/inventory.yml b/inventory.yml index 7e3c13b..8c472a1 100644 --- a/inventory.yml +++ b/inventory.yml @@ -13,12 +13,6 @@ all: # Just a test to see if the default template can # be run without any vars vars: - # If you want this playbook to only install Jenkins and let - # him be managed by other means thereafter, you can change this - # variable globally or by host. - # By default : False - jenkins_installonly: False - # Check if etckeeper is installed and /etc is clean checketckeeper: True diff --git a/roles/jenkins-php-v1/tasks/main.yml b/roles/jenkins-php-v1/tasks/main.yml index a9b4118..cc1249f 100644 --- a/roles/jenkins-php-v1/tasks/main.yml +++ b/roles/jenkins-php-v1/tasks/main.yml @@ -1,44 +1,26 @@ --- -# 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 + seconds: 10 # 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 - include_tasks: roles/jenkins-php-v1/tasks/60_install-nginx-proxy.yml - when: gogogo