ansible: add playbook for deploying a mozreview CI environment (
bug 1294805) r?gps,glob,smacleod
Add a playbook for deploying Jenkins and a mozreview test environment onto a
host. The 'jenkins' user on the host can then check out and run the mozreview
test suite.
The Jenkins jobs that automatically run the test suite are kept outside of version
control.
MozReview-Commit-ID: JhaunTTMti7
new file mode 100644
--- /dev/null
+++ b/ansible/deploy-mozreview-ci.yml
@@ -0,0 +1,26 @@
+# vim:ft=ansible:
+---
+
+- hosts: mozreview-ci
+ become: yes
+
+ pre_tasks:
+ # This is a hack to force the user to think about and set an appropriate
+ # admin user and password for the current environment. This keeps us from
+ # accidentally deploying the Jenkins default admin username and default
+ # admin password.
+ - fail: msg="You must set the 'jenkins_admin_username_override' variable before running this playbook"
+ when: jenkins_admin_username_override is undefined
+
+ - fail: msg="You must set the 'jenkins_admin_password_override' variable before running this playbook"
+ when: jenkins_admin_password_override is undefined
+
+ roles:
+ - { role: geerlingguy.jenkins,
+ jenkins_http_port: 80,
+ jenkins_repo_url: "http://pkg.jenkins.io/redhat-stable/jenkins.repo",
+ jenkins_repo_key_url: "http://pkg.jenkins.io/redhat-stable/jenkins.io.key",
+ jenkins_admin_username: "{{ jenkins_admin_username_override }}",
+ jenkins_admin_password: "{{ jenkins_admin_password_override }}"}
+ - { role: vct-dev-environment,
+ test_user: jenkins }