36 lines
1015 B
YAML
36 lines
1015 B
YAML
|
---
|
||
|
# .. vim: foldmarker=[[[,]]]:foldmethod=marker
|
||
|
#
|
||
|
# tasks file for netdata
|
||
|
|
||
|
# Manage repository [[[1
|
||
|
## Add repository
|
||
|
- name: Add OpenManage repository
|
||
|
apt_repository:
|
||
|
update_cache: False
|
||
|
repo: '{{ item.repo }}'
|
||
|
mode: '{{ item.mode | d(omit) }}'
|
||
|
filename: '{{ item.filename | d(omit) }}'
|
||
|
state: '{{ item.state | d("present") }}'
|
||
|
with_flattened:
|
||
|
- '{{ openmanage__repositories }}'
|
||
|
register: openmanage__register_repositories
|
||
|
|
||
|
## Add repository key
|
||
|
- name: Add OpenManage repo key
|
||
|
apt_key:
|
||
|
url: '{{ item.key_url | d(omit) }}'
|
||
|
id: '{{ item.key_id | d(omit) }}'
|
||
|
keyserver: '{{ item.key_keyserver | d(omit) }}'
|
||
|
with_flattened:
|
||
|
- '{{ openmanage__repositories }}'
|
||
|
register: openmanage__register_key
|
||
|
|
||
|
## Update cache
|
||
|
- name: Update APT cache
|
||
|
apt:
|
||
|
update_cache: True
|
||
|
when: (openmanage__deploy_state == "present") and
|
||
|
(openmanage__register_repositories.changed or
|
||
|
openmanage__register_key.changed)
|