summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Belanger <pabelanger@redhat.com>2016-02-16 09:11:27 -0500
committerPaul Belanger <pabelanger@redhat.com>2016-02-16 10:44:34 -0500
commit2c920229c465378ce7374892a08f70b3bf0bb973 (patch)
treeae45580e2b4649dad2c6158cce0de17a832fe787
parent5adc692f014dd430d47567af75521103d43ab432 (diff)
Create package install_method
This bring it inline with git and pip. Change-Id: I4f1c113abdd9b48112b68e4564cd5580dde7ae67 Signed-off-by: Paul Belanger <pabelanger@redhat.com>
Notes
Notes (review): Code-Review+2: Paul Belanger <pabelanger@redhat.com> Workflow+1: Paul Belanger <pabelanger@redhat.com> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Tue, 16 Feb 2016 16:38:07 +0000 Reviewed-on: https://review.openstack.org/280716 Project: openstack/ansible-role-jenkins-job-builder Branch: refs/heads/master
-rw-r--r--defaults/main.yaml2
-rw-r--r--tasks/install/debian.yaml6
-rw-r--r--tasks/install/package.yaml18
-rw-r--r--tasks/install/redhat.yaml6
4 files changed, 19 insertions, 13 deletions
diff --git a/defaults/main.yaml b/defaults/main.yaml
index dbc31be..d5c6fe1 100644
--- a/defaults/main.yaml
+++ b/defaults/main.yaml
@@ -48,7 +48,7 @@ jenkins_job_builder_install_method: git
48jenkins_job_builder_pip_name: jenkins-job-builder 48jenkins_job_builder_pip_name: jenkins-job-builder
49jenkins_job_builder_pip_version: 49jenkins_job_builder_pip_version:
50 50
51jenkins_job_builder_pkg_name: python-jenkins-job-builder 51jenkins_job_builder_package_name: python-jenkins-job-builder
52 52
53# handlers/main.yaml 53# handlers/main.yaml
54jenkins_job_builder_handler_check_delay: 10 54jenkins_job_builder_handler_check_delay: 10
diff --git a/tasks/install/debian.yaml b/tasks/install/debian.yaml
index e6555f0..77c592b 100644
--- a/tasks/install/debian.yaml
+++ b/tasks/install/debian.yaml
@@ -18,9 +18,3 @@
18 state: installed 18 state: installed
19 with_items: jenkins_job_builder_build_depends 19 with_items: jenkins_job_builder_build_depends
20 when: jenkins_job_builder_install_method == 'git' or jenkins_job_builder_install_method == 'pip' 20 when: jenkins_job_builder_install_method == 'git' or jenkins_job_builder_install_method == 'pip'
21
22- name: Install jenkins-job-builder using apt.
23 apt:
24 pkg: "{{ jenkins_job_builder_pkg_name }}"
25 state: installed
26 when: jenkins_job_builder_install_method == 'pkg'
diff --git a/tasks/install/package.yaml b/tasks/install/package.yaml
new file mode 100644
index 0000000..5440a1e
--- /dev/null
+++ b/tasks/install/package.yaml
@@ -0,0 +1,18 @@
1# Copyright 2015 Red Hat, Inc.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12# License for the specific language governing permissions and limitations
13# under the License.
14---
15- name: Install jenkins-job-builder from package.
16 package:
17 name: "{{ jenkins_job_builder_package_name }}"
18 state: installed
diff --git a/tasks/install/redhat.yaml b/tasks/install/redhat.yaml
index 9b68f4a..17792d3 100644
--- a/tasks/install/redhat.yaml
+++ b/tasks/install/redhat.yaml
@@ -25,9 +25,3 @@
25 state: installed 25 state: installed
26 with_items: jenkins_job_builder_build_depends 26 with_items: jenkins_job_builder_build_depends
27 when: jenkins_job_builder_install_method == 'git' or jenkins_job_builder_install_method == 'pip' 27 when: jenkins_job_builder_install_method == 'git' or jenkins_job_builder_install_method == 'pip'
28
29- name: Install jenkins-job-builder using yum.
30 yum:
31 pkg: "{{ jenkins_job_builder_pkg_name }}"
32 state: installed
33 when: jenkins_job_builder_install_method == 'pkg'