From 8ecccc67daf90045f9e0da9ac73e9eef8ce3b84c Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Mon, 12 Aug 2019 10:48:40 +0200 Subject: apt-repos: Supporting custom filenames. Useful if the package also delivers a sources.list file. --- ansible/roles/apt-repos/tasks/repo.yml | 3 +++ 1 file changed, 3 insertions(+) (limited to 'ansible/roles/apt-repos') diff --git a/ansible/roles/apt-repos/tasks/repo.yml b/ansible/roles/apt-repos/tasks/repo.yml index 135aeac..3ed3632 100644 --- a/ansible/roles/apt-repos/tasks/repo.yml +++ b/ansible/roles/apt-repos/tasks/repo.yml @@ -14,6 +14,9 @@ - name: "add repo {{ item.key }}" when: item.value.url is defined and state == "present" + vars: + filename: "{{ item.filename | default(item.key) }}" +# filename: "{{ item.filename if item.filename is defined else item.key }}" copy: dest: "/etc/apt/sources.list.d/{{ item.key }}.list" content: | -- cgit v1.2.3