Add support for openSUSE 88/64888/5
authorManuel Buil <mbuil@suse.com>
Mon, 30 Oct 2017 17:06:30 +0000 (18:06 +0100)
committerManuel Buil <mbuil@suse.com>
Mon, 6 Nov 2017 18:38:55 +0000 (19:38 +0100)
Change-Id: Id05855f473a2754a4e320bee7e7c21f24873fa12
Signed-off-by: Manuel Buil <mbuil@suse.com>
meta/main.yml
tasks/add_odl_zypper_repo.yml [new file with mode: 0644]
tasks/install_odl.yml
tasks/install_odl_via_rpm_path.yml
tasks/install_odl_via_rpm_repo.yml
vars/main.yml

index 3991512b48cd732705a74fb8d923fd460c323e4e..9629bccc190bcf83145d99cd6e576e10380a39f5 100644 (file)
@@ -13,6 +13,9 @@ galaxy_info:
     versions:
     - 25
     - 26
+  - name: OpenSUSE
+    versions:
+    - 42
   categories:
   - cloud
   - clustering
diff --git a/tasks/add_odl_zypper_repo.yml b/tasks/add_odl_zypper_repo.yml
new file mode 100644 (file)
index 0000000..99332e6
--- /dev/null
@@ -0,0 +1,6 @@
+- name: Add ODL zypper repo
+  zypper_repository:
+    repo: "{{ suse_rpm_repo_url }}"
+    name: opendaylight
+    auto_import_keys: yes
+    runrefresh: yes
index f96f9914a5579c5bf6109fe9b97ede1a5345d9dc..c15f40590ded1d6c97fe504a1617f57c0a699c12 100755 (executable)
 # Install ODL using Yum repo config
 - include: install_odl_via_rpm_repo.yml
   when:
-    - ansible_os_family == "RedHat"
+    - (ansible_os_family == "RedHat") or
+      (ansible_os_family == "Suse")
     - install_method == "rpm_repo"
 
 # Install ODL using rpm URL or a local path to a rpm file
 - include: install_odl_via_rpm_path.yml
   when:
-    - ansible_os_family == "RedHat"
+    - (ansible_os_family == "RedHat") or
+      (ansible_os_family == "Suse")
     - install_method == "rpm_path"
index 08cf0ff446113b8d0a31881775b05ca86fc8fa98..5ac0e8026ec354078cc655c8fdd10417dc656909 100644 (file)
@@ -3,3 +3,12 @@
   package:
     name={{ rpm_path }}
     state=present
+  when: ansible_os_family == 'RedHat'
+
+- name: Install ODL via RPM path
+  package:
+    name={{ suse_rpm_path }}
+    state=present
+  when: ansible_os_family == 'Suse'
+
+
index 600febad948104303cb5f7e88f5258010e0f5761..f6e426d44cf20b35b445abb8c19b597e156c5fe4 100644 (file)
@@ -1,5 +1,9 @@
 ---
 - include: add_odl_yum_repo.yml
+  when: ansible_os_family == "RedHat"
+
+- include: add_odl_zypper_repo.yml
+  when: ansible_os_family == "Suse"
 
 - name: Install ODL via RPM repo
   package:
index a1e551a0f3a0515a49f9907b0142cf142408f3f9..87a1516fc70b1085cf9ce57d08ee046d9f2f9da1 100755 (executable)
@@ -63,6 +63,7 @@ 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_url: "https://git.opendaylight.org/gerrit/gitweb?p=integration/packaging.git;a=blob_plain;f=packages/rpm/example_repo_configs/opendaylight-6-release.repo;hb=refs/heads/master"
+suse_rpm_repo_url: "https://download.opensuse.org/repositories/home:/mosquetero:/branches:/Virtualization:/NFV/openSUSE_Leap_42.3/"
 
 # 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"
@@ -75,6 +76,8 @@ deb_repo_url: "ppa:odl-team/nitrogen"
 # NB: This will only take effect when `install_method` is "rpm_path"
 # Default to the Carbon RPM hosted on the CentOS Community Build System
 rpm_path: "http://cbs.centos.org/repos/nfv7-opendaylight-60-release/x86_64/os/Packages/opendaylight-6.0.0-1.el7.noarch.rpm"
+# Default to the Nitrogen RPM hosted on the openSUSE OBS
+suse_rpm_path: "https://download.opensuse.org/repositories/home:/mosquetero:/branches:/Virtualization:/NFV/openSUSE_Leap_42.3/noarch/opendaylight-7.0.0-11.1.noarch.rpm"
 
 # This will be passed as the `deb` param to the Ansible `apt` module.
 # `deb` param docs: "Path to a .deb package on the remote machine. If :// in the path,