diff options
Diffstat (limited to 'ansible/roles/packages/tasks')
-rw-r--r-- | ansible/roles/packages/tasks/main.yml | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/ansible/roles/packages/tasks/main.yml b/ansible/roles/packages/tasks/main.yml new file mode 100644 index 0000000..45f64c3 --- /dev/null +++ b/ansible/roles/packages/tasks/main.yml @@ -0,0 +1,37 @@ +--- +- name: configure debian repositories + tags: packages + notify: update apt cache + 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 + + 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 + +- name: Enable backports repository by default + when: packages__enable_backports + copy: + dest: /etc/apt/preferences.d/bitraf-packages + content: | + Package: * + Pin: release a=stretch-backports + Pin-Priority: 500 + +- meta: flush_handlers + +- name: install debian packages + tags: packages + become: yes + apt: + name: "{{ packages_packages }}" + install_recommends: no |