diff --git a/inventory/host_vars/ingwer.freifunk-mwu.de b/inventory/host_vars/ingwer.freifunk-mwu.de index 5cd5b93..6b83c08 100644 --- a/inventory/host_vars/ingwer.freifunk-mwu.de +++ b/inventory/host_vars/ingwer.freifunk-mwu.de @@ -29,3 +29,5 @@ ffrl_exit_server: public_ipv4_address: 185.66.194.1 tunnel_ipv4_network: 100.64.1.114/31 tunnel_ipv6_network: 2a03:2260:0:90::/64 + +debian_apt_mirror: "debian.mirrors.ovh.net" diff --git a/roles/server-basic/README.md b/roles/server-basic/README.md index 2761041..5340846 100644 --- a/roles/server-basic/README.md +++ b/roles/server-basic/README.md @@ -12,3 +12,4 @@ Diese Ansible role installiert Pakete, die auf allen MWU-Server benötigt werden - Liste `packages` (Rollen Variable) - Variable `default_locale` (Rollen-Variable) +- Variable `debian_apt_mirror` diff --git a/roles/server-basic/defaults/main.yml b/roles/server-basic/defaults/main.yml new file mode 100644 index 0000000..3899b34 --- /dev/null +++ b/roles/server-basic/defaults/main.yml @@ -0,0 +1,2 @@ +--- +debian_apt_mirror: "ftp.de.debian.org" diff --git a/roles/server-basic/tasks/main.yml b/roles/server-basic/tasks/main.yml index f594df7..bdeff7d 100644 --- a/roles/server-basic/tasks/main.yml +++ b/roles/server-basic/tasks/main.yml @@ -1,4 +1,16 @@ --- +- name: configure debian apt repositories + template: + src: apt-sources-list.j2 + dest: /etc/apt/sources.list + owner: root + group: root + mode: 0644 + +- name: update package information + apt: + update_cache: yes + - name: ensure rpcbind is not installed package: name: rpcbind diff --git a/roles/server-basic/templates/apt-sources-list.j2 b/roles/server-basic/templates/apt-sources-list.j2 new file mode 100644 index 0000000..5a196c7 --- /dev/null +++ b/roles/server-basic/templates/apt-sources-list.j2 @@ -0,0 +1,15 @@ +# +# {{ ansible_managed }} +# + +deb http://{{ debian_apt_mirror }}/debian/ {{ ansible_distribution_release }} main contrib non-free +deb-src http://{{ debian_apt_mirror }}/debian/ {{ ansible_distribution_release }} main contrib non-free + +deb http://{{ debian_apt_mirror }}/debian/ {{ ansible_distribution_release }}-updates main contrib non-free +deb-src http://{{ debian_apt_mirror }}/debian/ {{ ansible_distribution_release }}-updates main contrib non-free + +deb http://{{ debian_apt_mirror }}/debian/ {{ ansible_distribution_release }}-backports main contrib non-free +deb-src http://{{ debian_apt_mirror }}/debian/ {{ ansible_distribution_release }}-backports main contrib non-free + +deb http://security.debian.org/debian-security {{ ansible_distribution_release }}/updates main contrib non-free +deb-src http://security.debian.org/debian-security {{ ansible_distribution_release }}/updates main contrib non-free