0eaa5cf59a
- bumps ansible-lint to 5.0 - updates our custom rules to make them compatible with 5.0 - replace custom module mocking with native ansible-lint ones - remove custom call of ansible-playbook --syntax-check as now this is done by ansible-lint - assured molecule vars are hosted under a vars/ folder in order to avoid confusing linter detection. - replaced custom rule for loop var names in role as now this this an optional core feature of the linter (see config) - replaced custom rule no-same-owner with opt-in one (see config) Change-Id: I233fae8c9036d295968a97ee80e07fde8846c633
33 lines
723 B
YAML
33 lines
723 B
YAML
- name: Install GnuPG for apt-key
|
|
become: true
|
|
when: repositories_keys | length > 0
|
|
apt:
|
|
name: gnupg
|
|
state: present
|
|
|
|
- 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 # noqa no-handler
|
|
become: true
|
|
apt:
|
|
update_cache: yes
|
|
when: _add_apt_repos is changed
|