]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-build.git/commitdiff
ansible: Add warning about restarting Jenkins to playbook
authorDavid Galloway <dgallowa@redhat.com>
Fri, 4 Aug 2017 19:48:58 +0000 (15:48 -0400)
committerDavid Galloway <dgallowa@redhat.com>
Tue, 22 Aug 2017 14:42:45 +0000 (10:42 -0400)
Signed-off-by: David Galloway <dgallowa@redhat.com>
ansible/examples/master.yml
ansible/roles/ansible-jenkins/handlers/main.yml
ansible/roles/ansible-jenkins/tasks/jenkins.yml

index 6216f9a80af641e2e550d114519df4632b8fb486..7be881ae10ad31167b592d924193ba051bb20362 100644 (file)
@@ -44,3 +44,7 @@
     #  smtp_host: 'mail.example.com'
     #  smtp_ssl: 'true'
     #  default_email_suffix: '@example.com'
+  vars_prompt:
+  - name: "okay_with_restart"
+    prompt: "\nWARNING: Some tasks like updating/installing plugins will restart Jenkins.\nAre you okay with restarting the Jenkins service? (y|n)"
+    default: "n"
index 1b67b76856dab1ba95afd29f8b42ef4ec15be447..0e1d688a9ddb894fa95d96afdc4718c7086594aa 100644 (file)
@@ -1,6 +1,7 @@
 # Safe-restart Jenkins
 - name: restart jenkins
   command: java -jar {{ jenkins.cli_dest }} -s http://localhost:{{ jenkins_port }} safe-restart
+  when: okay_with_restart == "y"
 
 - name: restart nginx
   service:
index 90e18c886d6bf234e7ed1844b244a9f0f9ba3687..9c49199e5d4626c5072e92bea48638831626cc3b 100644 (file)
@@ -22,6 +22,7 @@
 - include: config.yml
 
 - include: plugins.yml
+  when: okay_with_restart == "y"
   tags:
     - plugins