Skip to content
This repository has been archived by the owner on Feb 2, 2021. It is now read-only.

Commit

Permalink
move jenkins dependencies to defaults for overriding
Browse files Browse the repository at this point in the history
Ansible variable hierarchy gives highest precedence to role variables.
Having jenkins repo paths in role variables makes it difficult to
override them from outside the role itself. Moving these variables into
defaults allow for overriding in group_vars or inside another role that
imports ansible-jenkins as a dependency.
  • Loading branch information
eric-weaver committed Jun 6, 2016
1 parent 8660a79 commit fc05b7e
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 25 deletions.
24 changes: 24 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,27 @@ proxy_env:
prefix: "/"
# jenkins_admin_user: admin
# jenkins_admin_password: recommended to be put a vault file
jenkins_dest: /opt/jenkins
jenkins_lib: /var/lib/jenkins

#Debain variables
jenkins_deb_repo: 'deb http://pkg.jenkins-ci.org/debian binary/' # Jenkins repository
jenkins_deb_apt_key: 'http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key' # Jenkins repository apt-key
jenkins_deb_dependencies:
- 'openjdk-7-jre'
- 'openjdk-7-jdk'
- 'git'
- 'curl'

#Redhat variables
jenkins_redhat_repo: 'http://pkg.jenkins-ci.org/redhat/jenkins.repo'
jenkins_redhat_key: 'https://jenkins-ci.org/redhat/jenkins-ci.org.key'
jenkins_redhat_dependencies:
- 'java'
- 'git'
- 'curl'

jenkins_cli_dest: '{{ jenkins_dest }}/jenkins-cli.jar' # Jenkins CLI destination
jenkins_updates_dest: '{{ jenkins_dest }}/updates_jenkins.json' # Jenkins updates file
jenkins_api_url: "http://localhost:{{ port }}{{ prefix }}"
jenkins_cli_cmd: "java -jar {{ jenkins_cli_dest }} -s {{ jenkins_api_url }}"
25 changes: 0 additions & 25 deletions vars/main.yml

This file was deleted.

0 comments on commit fc05b7e

Please sign in to comment.