diff --git a/playbooks/bootstrap.yml b/playbooks/bootstrap.yml index 288b61e..0ad6098 100644 --- a/playbooks/bootstrap.yml +++ b/playbooks/bootstrap.yml @@ -12,6 +12,10 @@ become: true when: ansible_distribution in [ "AlmaLinux", "CentOS", "Rocky" ] + - role: os_deb + become: true + when: ansible_distribution in [ "Debian", "Ubuntu" ] + # Upgrade all packages and install the basic-bitch ones - role: base_system become: true diff --git a/roles/os_deb/tasks/main.yml b/roles/os_deb/tasks/main.yml new file mode 100644 index 0000000..60dd0af --- /dev/null +++ b/roles/os_deb/tasks/main.yml @@ -0,0 +1,4 @@ +--- +- name: Enable all Debian repos + ansible.builtin.include_tasks: repositories.yml + when: ansible_facts.distribution == "Debian" diff --git a/roles/os_deb/tasks/repositories.yml b/roles/os_deb/tasks/repositories.yml new file mode 100644 index 0000000..545ae2b --- /dev/null +++ b/roles/os_deb/tasks/repositories.yml @@ -0,0 +1,18 @@ +--- +- name: Disable installation DVD as a source + ansible.builtin.lineinfile: + path: /etc/apt/sources.list + regexp: "^deb cdrom:" + state: absent + +- name: Enable additional repository + ansible.builtin.apt_repository: + repo: "{{ item }}" + state: present + loop: + - deb http://ftp.sk.debian.org/debian/ {{ ansible_facts.distribution_release }} contrib non-free + - deb-src http://ftp.sk.debian.org/debian/ {{ ansible_facts.distribution_release }} contrib non-free + - deb http://security.debian.org/debian-security {{ ansible_facts.distribution_release }}-security contrib non-free + - deb-src http://security.debian.org/debian-security {{ ansible_facts.distribution_release }}-security contrib non-free + - deb http://ftp.sk.debian.org/debian/ {{ ansible_facts.distribution_release }}-updates contrib non-free + - deb-src http://ftp.sk.debian.org/debian/ {{ ansible_facts.distribution_release }}-updates contrib non-free