b62c488eab
Ansible 2.9 requires the use of "version" as a filter and "version_compare" has been removed. Also tests cannot be used as filters which means we cannot do when: foo | test and must do when: foo is test instead. Make these fixes. Both changes should be backward compatible to ansible 2.5: https://docs.ansible.com/ansible/latest/user_guide/playbooks_tests.html#version-comparison https://docs.ansible.com/ansible/latest/porting_guides/porting_guide_2.5.html#jinja-tests-used-as-filters Change-Id: Id95f674a485877db2a7924994366d1c6c591a684
35 lines
988 B
YAML
35 lines
988 B
YAML
- name: set zypper base package repository (openSUSE Leap)
|
|
set_fact:
|
|
opensuse_repo_baseurl: "{{ package_mirror }}/distribution/leap/$releasever/repo/oss/"
|
|
when: ansible_distribution is not search("Tumbleweed")
|
|
|
|
- name: set zypper base package repository (openSUSE Tumbleweed)
|
|
set_fact:
|
|
opensuse_repo_baseurl: "{{ package_mirror }}/tumbleweed/repo/oss/"
|
|
when: ansible_distribution is 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: ansible_distribution is not search("Tumbleweed")
|