e4345c217e
This role allows users to supply a common variable and it will contain all the logic to configure the correct repository based on their operating system. Co-Authored-By: Andreas Jaeger <aj@suse.com> Change-Id: I4a3ab5f099c2e4671b78c751d8f0e8ccf2304afa
26 lines
573 B
YAML
26 lines
573 B
YAML
- name: Add apt keys
|
|
become: true
|
|
apt_key:
|
|
url: "{{ zj_item['url'] | default(omit) }}"
|
|
data: "{{ zj_item['data'] | default(omit) }}"
|
|
loop: "{{ repositories_keys }}"
|
|
loop_control:
|
|
loop_var: zj_item
|
|
|
|
- name: Add apt repositories
|
|
become: true
|
|
apt_repository:
|
|
repo: "{{ zj_item['repo'] | default(omit) }}"
|
|
state: present
|
|
update_cache: no
|
|
loop: "{{ repositories_list }}"
|
|
loop_control:
|
|
loop_var: zj_item
|
|
register: _add_apt_repos
|
|
|
|
- name: Update APT cache
|
|
become: true
|
|
apt:
|
|
update_cache: yes
|
|
when: _add_apt_repos is changed
|