Signed-off-by: David Galloway <dgallowa@redhat.com>
# 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"
# 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:
- include: config.yml
- include: plugins.yml
+ when: okay_with_restart == "y"
tags:
- plugins