Create package install_method

This bring it inline with git and pip.

Change-Id: I4f1c113abdd9b48112b68e4564cd5580dde7ae67
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
Paul Belanger 2016-02-16 09:11:27 -05:00
parent 5adc692f01
commit 2c920229c4
4 changed files with 19 additions and 13 deletions

View File

@ -48,7 +48,7 @@ jenkins_job_builder_install_method: git
jenkins_job_builder_pip_name: jenkins-job-builder
jenkins_job_builder_pip_version:
jenkins_job_builder_pkg_name: python-jenkins-job-builder
jenkins_job_builder_package_name: python-jenkins-job-builder
# handlers/main.yaml
jenkins_job_builder_handler_check_delay: 10

View File

@ -18,9 +18,3 @@
state: installed
with_items: jenkins_job_builder_build_depends
when: jenkins_job_builder_install_method == 'git' or jenkins_job_builder_install_method == 'pip'
- name: Install jenkins-job-builder using apt.
apt:
pkg: "{{ jenkins_job_builder_pkg_name }}"
state: installed
when: jenkins_job_builder_install_method == 'pkg'

View File

@ -0,0 +1,18 @@
# Copyright 2015 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
---
- name: Install jenkins-job-builder from package.
package:
name: "{{ jenkins_job_builder_package_name }}"
state: installed

View File

@ -25,9 +25,3 @@
state: installed
with_items: jenkins_job_builder_build_depends
when: jenkins_job_builder_install_method == 'git' or jenkins_job_builder_install_method == 'pip'
- name: Install jenkins-job-builder using yum.
yum:
pkg: "{{ jenkins_job_builder_pkg_name }}"
state: installed
when: jenkins_job_builder_install_method == 'pkg'