aboutsummaryrefslogtreecommitdiff
path: root/ansible
diff options
context:
space:
mode:
Diffstat (limited to 'ansible')
-rw-r--r--ansible/all.yml6
-rw-r--r--ansible/group_vars/workstation/apt-repos.yml1
-rw-r--r--ansible/plays/apt-repos.yml6
-rw-r--r--ansible/roles/apt-repos/tasks/repo.yml3
4 files changed, 12 insertions, 4 deletions
diff --git a/ansible/all.yml b/ansible/all.yml
index 05502bf..e4b4550 100644
--- a/ansible/all.yml
+++ b/ansible/all.yml
@@ -7,10 +7,8 @@
tags: packages
become: yes
- trygvis-base
- - role: apt-repos
- tags: apt-repos
- become: yes
-# - ufw
+
+- import_playbook: plays/apt-repos.yml
- hosts:
- knot
diff --git a/ansible/group_vars/workstation/apt-repos.yml b/ansible/group_vars/workstation/apt-repos.yml
index dcdca16..b5df581 100644
--- a/ansible/group_vars/workstation/apt-repos.yml
+++ b/ansible/group_vars/workstation/apt-repos.yml
@@ -116,3 +116,4 @@ apt_repos:
sections: main
key_id: ACCC4CF8
keyserver: hkp://keyserver.ubuntu.com:80
+ filename: apt_postgresql_org_pub_repos_apt.list
diff --git a/ansible/plays/apt-repos.yml b/ansible/plays/apt-repos.yml
new file mode 100644
index 0000000..7a9156c
--- /dev/null
+++ b/ansible/plays/apt-repos.yml
@@ -0,0 +1,6 @@
+- hosts:
+ - all
+ roles:
+ - role: apt-repos
+ tags: apt-repos
+ become: yes
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: |