aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ansible/group_vars/all/packages.yml2
-rw-r--r--ansible/host_vars/conflatorio/main.yml1
-rw-r--r--ansible/roles/packages/tasks/main.yml36
3 files changed, 30 insertions, 9 deletions
diff --git a/ansible/group_vars/all/packages.yml b/ansible/group_vars/all/packages.yml
new file mode 100644
index 0000000..fadca1c
--- /dev/null
+++ b/ansible/group_vars/all/packages.yml
@@ -0,0 +1,2 @@
+packages_packages:
+ - pwgen
diff --git a/ansible/host_vars/conflatorio/main.yml b/ansible/host_vars/conflatorio/main.yml
new file mode 100644
index 0000000..3d41056
--- /dev/null
+++ b/ansible/host_vars/conflatorio/main.yml
@@ -0,0 +1 @@
+packages__version: unstable
diff --git a/ansible/roles/packages/tasks/main.yml b/ansible/roles/packages/tasks/main.yml
index 45f64c3..45077cc 100644
--- a/ansible/roles/packages/tasks/main.yml
+++ b/ansible/roles/packages/tasks/main.yml
@@ -5,18 +5,36 @@
become: yes
copy:
dest: /etc/apt/sources.list
- content: |
- deb http://ftp.no.debian.org/debian/ stretch main contrib non-free
- deb-src http://ftp.no.debian.org/debian/ stretch main contrib non-free
+ content: "{{ versions[packages__version] }}"
+ vars:
+ versions:
+ stretch: |
+ deb http://ftp.no.debian.org/debian/ stretch main contrib non-free
+ deb-src http://ftp.no.debian.org/debian/ stretch main contrib non-free
+
+ deb http://security.debian.org/debian-security stretch/updates main contrib non-free
+ deb-src http://security.debian.org/debian-security stretch/updates main contrib non-free
+
+ deb http://ftp.no.debian.org/debian/ stretch-updates main contrib non-free
+ deb-src http://ftp.no.debian.org/debian/ stretch-updates main contrib non-free
+
+ {{ '' if packages__enable_backports else '#' }}deb http://ftp.no.debian.org/debian/ stretch-backports main contrib non-free
+ {{ '' if packages__enable_backports else '#' }}deb-src http://ftp.no.debian.org/debian/ stretch-backports main contrib non-free
+ jessie: |
+ deb http://ftp.no.debian.org/debian/ jessie main contrib non-free
+ deb-src http://ftp.no.debian.org/debian/ jessie main contrib non-free
- deb http://security.debian.org/debian-security stretch/updates main contrib non-free
- deb-src http://security.debian.org/debian-security stretch/updates main contrib non-free
+ deb http://security.debian.org/debian-security jessie/updates main contrib non-free
+ deb-src http://security.debian.org/debian-security jessie/updates main contrib non-free
- deb http://ftp.no.debian.org/debian/ stretch-updates main contrib non-free
- deb-src http://ftp.no.debian.org/debian/ stretch-updates main contrib non-free
+ deb http://ftp.no.debian.org/debian/ jessie-updates main contrib non-free
+ deb-src http://ftp.no.debian.org/debian/ jessie-updates main contrib non-free
- {{ '' if packages__enable_backports else '#' }}deb http://ftp.no.debian.org/debian/ stretch-backports main contrib non-free
- {{ '' if packages__enable_backports else '#' }}deb-src http://ftp.no.debian.org/debian/ stretch-backports main contrib non-free
+ {{ '' if packages__enable_backports else '#' }}deb http://ftp.no.debian.org/debian/ jessie-backports main contrib non-free
+ {{ '' if packages__enable_backports else '#' }}deb-src http://ftp.no.debian.org/debian/ jessie-backports main contrib non-free
+ unstable: |
+ deb http://ftp.no.debian.org/debian/ unstable main contrib non-free
+ deb-src http://ftp.no.debian.org/debian/ unstable main contrib non-free
- name: Enable backports repository by default
when: packages__enable_backports