Setup repositories for openSUSE Tumbleweed
Tumbleweed as a rolling release model distribution does not have a sensible release version and is kept distinct from the classing "release + update" distributions that are called "Leap". Conditionalize the repository setup for tumbleweed properly, the base path is different and it does not have a releaseversion component (the release version is always changing, it is the snapshot date in the form YYYYMMDD). Change-Id: I700ba2279dc7aadc7051cad53898e1de9007a08d
This commit is contained in:
parent
5c0bb18336
commit
7172bd5dc8
@ -1,3 +1,13 @@
|
||||
- name: set zypper base package repository (openSUSE Leap)
|
||||
set_fact:
|
||||
opensuse_repo_baseurl: "{{ package_mirror }}/distribution/leap/$releasever/repo/oss/"
|
||||
when: not ansible_distribution | search("Tumbleweed")
|
||||
|
||||
- name: set zypper base package repository (openSUSE Tumbleweed)
|
||||
set_fact:
|
||||
opensuse_repo_baseurl: "{{ package_mirror }}/distribution/tumbleweed/repo/oss/"
|
||||
when: ansible_distribution | search("Tumbleweed")
|
||||
|
||||
- name: Install Suse repository files
|
||||
become: yes
|
||||
template:
|
||||
@ -8,6 +18,17 @@
|
||||
src: "{{ item }}.j2"
|
||||
with_items:
|
||||
- etc/zypp/repos.d/repo-oss.repo
|
||||
- etc/zypp/repos.d/repo-update.repo
|
||||
notify:
|
||||
- Update zypper cache
|
||||
|
||||
- name: Install openSUSE Leap Update repository
|
||||
become: yes
|
||||
template:
|
||||
dest: /etc/zypp/repos.d/repo-update.repo
|
||||
group: root
|
||||
mode: 0644
|
||||
owner: root
|
||||
src: etc/zypp/repos.d/repo-update.repo.j2
|
||||
notify:
|
||||
- Update zypper cache
|
||||
when: not ansible_distribution | search("Tumbleweed")
|
||||
|
@ -3,6 +3,6 @@
|
||||
name=repo-oss
|
||||
enabled=1
|
||||
autorefresh=0
|
||||
baseurl={{ package_mirror }}/distribution/leap/$releasever/repo/oss/
|
||||
baseurl={{ opensuse_repo_baseurl }}
|
||||
type=yast2
|
||||
keeppackages=0
|
||||
|
Loading…
Reference in New Issue
Block a user