---
- name: Set aptcache
  ansible.builtin.copy:
    dest: /etc/apt/apt.conf
    mode: '0644'
    content: >
      {{ apt_conf }}
  when: apt_conf | bool | default(false)

- name: Set NTP server
  ansible.builtin.lineinfile:
    path: /etc/systemd/timesyncd.conf
    insertafter: '^#NTP='
    line: NTP={{ ntp_serv }}
  when: ntp_serv | bool | default(false)

- name: Add proposed-updates repository
  ansible.builtin.apt_repository:
    repo: >
      deb http://deb.debian.org/debian/ {{ ansible_distribution_release }}-proposed-updates
      main non-free-firmware
    state: present
  when: "'R202' in group_names"
