--- /dev/null
+- name: Add the repository key to apt
+ apt_key:
+ url={{ deb_key }}
+ state=present
+
+- name: Add ODL deb repo
+ apt_repository:
+ repo={{ deb_repo_url }}
+ state=present
+ filename='opendaylight'
+ update_cache=yes
+
+- name: Add jessie-backports
+ apt_repository:
+ repo="deb http://httpredir.debian.org/debian jessie-backports main"
+ state=present
+ filename='jessie-backports'
+ update_cache=yes
\ No newline at end of file
---
+- name: Debugging
+ debug: msg="{{ ansible_distribution }} {{ ansible_os_family }} {{ ansible_distribution_version }} {{ ansible_distribution_release }} {{ ansible_distribution_major_version }} {{ ansible_lsb.major_release }}"
+
+- set_fact:
+ os="{{ ansible_distribution }}_{{ ansible_distribution_major_version }}.0"
+ when:
+ ansible_distribution == "Debian"
+- set_fact:
+ os="x{{ ansible_distribution }}_{{ ansible_distribution_version }}"
+ when:
+ ansible_distribution == "Ubuntu"
+
+- include: install_odl_via_deb_repo.yml
+ when:
+ - ansible_os_family == "Debian"
+ - install_method == "deb_repo"
+
- include: install_odl_via_rpm_repo.yml
- when: install_method == "rpm_repo"
+ when:
+ - ansible_os_family == "CentOS"
+ - install_method == "rpm_repo"
- include: install_odl_via_rpm_path.yml
- when: install_method == "rpm_path"
+ when:
+ - ansible_os_family == "CentOS"
+ - install_method == "rpm_path"
\ No newline at end of file
--- /dev/null
+---
+- include: add_odl_deb_repo.yml
+
+- name: Install ODL via Deb repo
+ apt:
+ name=opendaylight
+ state=present
\ No newline at end of file
# 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"
+# dep_repo: Install ODL using a debian repository
+install_method: "deb_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-5-release.repo"
rpm_repo_url: "https://git.opendaylight.org/gerrit/gitweb?p=integration/packaging.git;a=blob_plain;f=rpm/example_repo_configs/opendaylight-5-release.repo;hb=refs/heads/master"
+# 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: "deb http://download.opensuse.org/repositories/home:/akshitajha/{{ os }}/ /"
+# URL to add the repository key to 'apt'
+deb_key: "http://download.opensuse.org/repositories/home:akshitajha/{{ os }}/Release.key"
+
# 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
# NB: Local paths must be relative the host being configured (think `/vagrant`)
# NB: This will only take effect when `install_method` is "rpm_path"
# Default to the Boron RPM hosted on the CentOS Community Build System
-rpm_path: "http://cbs.centos.org/repos/nfv7-opendaylight-5-release/x86_64/os/Packages/opendaylight-4.2.0-1.el7.noarch.rpm"
+rpm_path: "http://cbs.centos.org/repos/nfv7-opendaylight-5-release/x86_64/os/Packages/opendaylight-4.2.0-1.el7.noarch.rpm"
\ No newline at end of file