Setup `/etc/apt/sources.list` from a template.
[servers]
iskra-aviel.phdru.name
oper.med.ru
-phdru.name
+phdru.name debian_mirror=http://debian.mirror.cambrium.nl/debian
+
+[all:vars]
+debian_distr=stretch
+debian_mirror=http://mirror.yandex.ru/debian
-Init new Debian system: install minimal list of packages.
+Init new Debian system: configure apt, install minimal list of packages.
+- name: Configure apt
+ become: true
+ template:
+ src: sources.list
+ dest: /etc/apt/sources.list
+ owner: root
+ group: root
+ mode: '0640'
+
- name: Install minimal software packages
become: true
apt:
purge: yes
state: latest
update_cache: yes
+
+- name: Configure apt key for deb-multimedia
+ become: true
+ apt_key:
+ keyserver: keyserver.ubuntu.com
+ id: 5C808C2B65558117
+ when: "inventory_hostname in ('localhost', 'iskra-aviel.phdru.name')"
--- /dev/null
+deb {{ debian_mirror }} {{ debian_distr }} main non-free contrib
+deb {{ debian_mirror }} {{ debian_distr }}-updates main non-free contrib
+
+deb {{ debian_mirror }}-security {{ debian_distr }}/updates main non-free contrib
+#deb {{ debian_mirror }} {{ debian_distr }}-backports main non-free contrib
+{% if inventory_hostname in ('localhost', 'iskra-aviel.phdru.name') %}
+
+deb {{ debian_mirror }}-multimedia {{ debian_distr }} main non-free
+#deb {{ debian_mirror }}-multimedia {{ debian_distr }}-backports main non-free
+
+#deb https://deb.opera.com/opera/ stable non-free
+#deb https://download.virtualbox.org/virtualbox/debian {{ debian_distr }} contrib non-free
+{% endif %}
[servers]
-vbox ansible_host=localhost ansible_port=2022
+vbox ansible_host=localhost ansible_port=2022 debian_distr=buster
+
+[all:vars]
+debian_distr=stretch
+debian_mirror=https://mirror.yandex.ru/debian