Build the repo url when odl_version is passed
[integration/packaging/ansible-opendaylight.git] / vars / main.yml
index 020c5515c0cb33a52b38eae84089f2aa5c5eebc7..9202936618e89534fb4cb2907eddb82432019263 100755 (executable)
@@ -60,14 +60,22 @@ akka_remoting_port: 2550
 #   deb_path: Install ODL .deb from a local path or remote URL
 install_method: "rpm_repo"
 
+# We need this dictionary to translate from ODL version to the version number
+odl_version_dict:
+  master: 9
+  fluorine: 9
+  oxygen: 8
+  nitrogen: 7
+
 # 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_url: "{{ odl_repo_url | default('https://git.opendaylight.org/gerrit/gitweb?p=integration/packaging.git;a=blob_plain;f=packages/rpm/example_repo_configs/opendaylight-8-devel.repo') }}"
-suse_rpm_repo_url: "{{ odl_repo_url | default('https://download.opensuse.org/repositories/Virtualization:/NFV/openSUSE_Leap_42.3/') }}"
+rpm_repo_url: "{% if odl_version is defined %}https://git.opendaylight.org/gerrit/gitweb?p=integration/packaging.git;a=blob_plain;f=packages/rpm/example_repo_configs/opendaylight-{{ odl_version_dict[odl_version] }}-devel.repo{% else %}https://git.opendaylight.org/gerrit/gitweb?p=integration/packaging.git;a=blob_plain;f=packages/rpm/example_repo_configs/opendaylight-8-devel.repo{% endif %}"
+suse_rpm_repo_url: "{% if odl_version is defined %}https://git.opendaylight.org/gerrit/gitweb?p=integration/packaging.git;a=blob_plain;f=packages/rpm/example_repo_configs/opendaylight-{{ odl_version_dict[odl_version] }}-opensuse-devel.repo{% else %}https://download.opensuse.org/repositories/Virtualization:/NFV/openSUSE_Leap_42.3/{% endif %}"
 
 # URL of the deb repository to use when installing ODL from a repo
 # NB: This will only take effect when `install_method` is "deb_repo"
-deb_repo_url: "{{ odl_repo_url | default('ppa:odl-team/oxygen') }}"
+# TODO: When deb snaps are built, point to a repo like rpm
+deb_repo_url: "ppa:odl-team/oxygen"
 
 # 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."