Ian Wienand 2462d16322 configure-mirrors: make separate template directories for each platform
This keeps each platform's "/etc" template files in a separate
top-level directory.

Additionally, we add a distro major version match to the task import
and rename centos7 (in preparation for centos8).

Change-Id: If65d51a27e30311b1da20522afb6dbce7ee6cf35
2019-10-15 17:04:57 +11:00

35 lines
985 B
YAML

- 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 }}/tumbleweed/repo/oss/"
when: ansible_distribution | search("Tumbleweed")
- name: Install Suse repository files
become: yes
template:
dest: "/{{ item }}"
group: root
mode: 0644
owner: root
src: "suse/{{ item }}.j2"
with_items:
- etc/zypp/repos.d/repo-oss.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: suse/etc/zypp/repos.d/repo-update.repo.j2
notify:
- Update zypper cache
when: not ansible_distribution | search("Tumbleweed")