diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2018-11-26 22:33:54 +0100 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2018-11-26 22:33:54 +0100 |
commit | b7bccaf7ff75fd2234b9232f595cbc8e226b80e9 (patch) | |
tree | 3e2822166b9be455f7589e56ca28a685bbccd2d8 /ansible/roles/packages | |
parent | 6fe44ad6366232314d45502d387ccbc671e84d9f (diff) | |
download | infra-b7bccaf7ff75fd2234b9232f595cbc8e226b80e9.tar.gz infra-b7bccaf7ff75fd2234b9232f595cbc8e226b80e9.tar.bz2 infra-b7bccaf7ff75fd2234b9232f595cbc8e226b80e9.tar.xz infra-b7bccaf7ff75fd2234b9232f595cbc8e226b80e9.zip |
o Importing bitraf-base, packages and postfix-satellite from Bitraf.
o Configuring nextcloud.
Diffstat (limited to 'ansible/roles/packages')
-rw-r--r-- | ansible/roles/packages/defaults/main.yml | 2 | ||||
-rw-r--r-- | ansible/roles/packages/handlers/main.yml | 5 | ||||
-rw-r--r-- | ansible/roles/packages/tasks/main.yml | 37 |
3 files changed, 44 insertions, 0 deletions
diff --git a/ansible/roles/packages/defaults/main.yml b/ansible/roles/packages/defaults/main.yml new file mode 100644 index 0000000..82869b4 --- /dev/null +++ b/ansible/roles/packages/defaults/main.yml @@ -0,0 +1,2 @@ +packages__enable_backports: no +packages_packages: diff --git a/ansible/roles/packages/handlers/main.yml b/ansible/roles/packages/handlers/main.yml new file mode 100644 index 0000000..0298ff9 --- /dev/null +++ b/ansible/roles/packages/handlers/main.yml @@ -0,0 +1,5 @@ +--- +- name: update apt cache + become: yes + apt: + update_cache: yes 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 |