add support to manage repos

This commit is contained in:
nd 2019-05-25 00:56:46 +02:00
parent 496e116830
commit 9f1729ceee
No known key found for this signature in database
GPG key ID: 21B5CD4DEE3670E9
4 changed files with 75 additions and 1 deletions

View file

@ -1,11 +1,24 @@
- set_fact:
pkgs: "{{ packages.pkg | dict2items | rejectattr('value', 'none') | map(attribute='key') | list }}"
- name: list repositories to setup
debug:
var: packages.repos
verbosity: 1
- name: list packages to install
debug:
var: pkgs
verbosity: 1
- name: install apt-transport-https
apt: pkg=apt-transport-https
- name: setup repositories
include_tasks: repo.yml
with_items: "{{ packages.repos }}"
- meta: flush_handlers
- name: install packages
apt:
pkg: "{{ pkgs }}"
update_cache: yes