Add var to select .repo used for installing ODL 23/57523/1
authorDaniel Farrell <dfarrell@redhat.com>
Wed, 27 Jan 2016 20:01:30 +0000 (15:01 -0500)
committerDaniel Farrell <dfarrell@redhat.com>
Fri, 19 May 2017 16:52:25 +0000 (12:52 -0400)
Defaults to Li SR3 repo config provided by upstream Int/Pack.

Can be overridden to install different ODL repo configs, and therefore
different ODL versions.

Other vars, like the karaf feature repos, would also need to be updated
if a different version of ODL is to be installed.

Change-Id: I33ee6cfe461d7dc1fda27a4107025faf6684b24f
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
files/opendaylight-3-candidate.repo [deleted file]
tasks/add_odl_yum_repo.yml
vars/main.yml

diff --git a/files/opendaylight-3-candidate.repo b/files/opendaylight-3-candidate.repo
deleted file mode 100644 (file)
index 946bf8f..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-[opendaylight-3-candidate]
-name=CentOS CBS OpenDaylight Lithium candidate repository
-baseurl=http://cbs.centos.org/repos/nfv7-opendaylight-3-candidate/$basearch/os/
-enabled=1
-gpgcheck=0
index 6370004720a675ac91283f1ef4f10a6023c949a7..c5a272655bfa0b14f846249b7233bf38aedc5897 100644 (file)
@@ -1,7 +1,10 @@
-- name: Add ODL yum repo
-  copy:
-    src=opendaylight-3-candidate.repo
-    dest=/etc/yum.repos.d/
+- name: Download ODL yum repo
+  get_url:
+    url={{ rpm_repo_url }}
+    dest=/etc/yum.repos.d/{{ rpm_repo_file }}
+- name: Set ODL yum repo file properties
+  file:
+    path=/etc/yum.repos.d/{{ rpm_repo_file }}
     owner=root
     group=root
     mode=0644
index 53f7e1a175ff2b65ea7e4ec6967dd3030999ff57..bef2698011d1176ce503e3acd0b21cfaf45fd251 100644 (file)
@@ -56,6 +56,11 @@ extra_feature_repos: []
 #   rpm_path: Install ODL from a local path or remote URL
 install_method: "rpm_repo"
 
+# URL of the .repo config to use when installing ODL from a repo
+# NB: This will only take effect when `install_method` is "rpm_repo"
+rpm_repo_file: "opendaylight-33-release.repo"
+rpm_repo_url: "https://git.opendaylight.org/gerrit/gitweb?p=integration/packaging.git;a=blob_plain;f=rpm/example_repo_configs/opendaylight-33-release.repo;hb=refs/heads/master"
+
 # This will be passed as the `name` param to the Ansible `yum` module.
 # `name` param docs: "You can also pass a url or a local path to a rpm file."
 #   See: http://docs.ansible.com/ansible/yum_module.html