Add local/remote path-based ODL RPM install 09/57509/1
authorDaniel Farrell <dfarrell@redhat.com>
Sun, 26 Jul 2015 03:30:58 +0000 (23:30 -0400)
committerDaniel Farrell <dfarrell@redhat.com>
Fri, 19 May 2017 16:52:24 +0000 (12:52 -0400)
Introduces a number of API changes, but the default
is still a remote Yum repo-based install.

Change-Id: Icb8d8a2ed02a5a17402aa412a5fe131a612e640a
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
tasks/install_odl_rpm.yml [deleted file]
tasks/install_odl_via_rpm_path.yml [new file with mode: 0644]
tasks/install_odl_via_rpm_repo.yml [new file with mode: 0644]
tasks/main.yml
vars/main.yml

diff --git a/tasks/install_odl_rpm.yml b/tasks/install_odl_rpm.yml
deleted file mode 100644 (file)
index e3cd131..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-- name: Install ODL RPM
-  yum:
-    name=opendaylight
-    state=present
-    update_cache=yes
diff --git a/tasks/install_odl_via_rpm_path.yml b/tasks/install_odl_via_rpm_path.yml
new file mode 100644 (file)
index 0000000..c4b1b29
--- /dev/null
@@ -0,0 +1,5 @@
+---
+- name: Install ODL via RPM path
+  yum:
+    name={{ rpm_path }}
+    state=present
diff --git a/tasks/install_odl_via_rpm_repo.yml b/tasks/install_odl_via_rpm_repo.yml
new file mode 100644 (file)
index 0000000..1fc0b03
--- /dev/null
@@ -0,0 +1,8 @@
+---
+- include: add_odl_yum_repo.yml
+
+- name: Install ODL via RPM repo
+  yum:
+    name=opendaylight
+    state=present
+    update_cache=yes
index ce5d97a5dd593765142cd3548fcd18457fc1c007..bbd1a579bb6464f574657306eb0bbbc7e32acda2 100644 (file)
@@ -1,6 +1,8 @@
 ---
-- include: add_odl_yum_repo.yml
-- include: install_odl_rpm.yml
+- include: install_odl_via_rpm_repo.yml
+  when: install_method == "rpm_repo"
+- include: install_odl_via_rpm_path.yml
+  when: install_method == "rpm_path"
 - include: configure_karaf_features.yml
 - include: configure_nb_rest_port.yml
 - include: open_nb_rest_port.yml
index c856dc2d96637a8e11ac05552e971e21220fa88a..1d43d8ff82fca75abf17370cb6faf17a85dcd5ec 100644 (file)
@@ -49,3 +49,18 @@ default_feature_repos:
 # configured in the ODL release artifact. You may need to override this to
 # configure additional repos to search for Karaf features.
 extra_feature_repos: []
+
+# Method to install ODL
+# Valid options:
+#   rpm_repo: Install ODL using its Yum repo config
+#   rpm_path: Install ODL from a local path or remote URL
+install_method: "rpm_repo"
+
+# This will be passed as the `name` param to the Ansible `yum` module.
+# Docs for `name` param: "You can also pass a url or a local path to a rpm file."
+# http://docs.ansible.com/ansible/yum_module.html
+# NB: Local paths must be relative the host being configured (think `/vagrant`)
+# Defaulting to the latest available RPM, hosted remotely via Fedora Copr
+# NB: This will (hopefully) change soon to point at the CentOS NFV SIG's
+#   Koji repo on the CentOS Community Build System (CBS).
+rpm_path: "https://copr-be.cloud.fedoraproject.org/results/dfarrell07/OpenDaylight/epel-7-x86_64/opendaylight-0.2.3-2/opendaylight-0.2.3-2.el7.centos.noarch.rpm"