diff --git a/tasks/main.yml b/tasks/main.yml index 061e0a7..c6fd4b7 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -6,7 +6,7 @@ when: editor_is_vim | bool - include_tasks: sources.yml - when: add_ethz | bool + when: ansible_distribution == 'Debian' - name: Install common base packages [Debian] become: yes @@ -32,18 +32,6 @@ when: ansible_distribution == 'Fedora' -- name: Install some common Debian specific packages - become: yes - apt: - package: - - debian-goodies - - apt-dater-host - - apt-transport-https - state: present - update_cache: yes - cache_valid_time: 43200 - when: ansible_distribution == 'Debian' - - name: install packages for everyone except centos/rhel become: true package: diff --git a/tasks/sources.yml b/tasks/sources.yml index cf913ce..f5a0063 100644 --- a/tasks/sources.yml +++ b/tasks/sources.yml @@ -1,5 +1,18 @@ --- -- name: add etz apt +- name: Install some common Debian specific packages + become: yes + apt: + package: + - debian-goodies + - apt-dater-host + - apt-transport-https + state: present + update_cache: yes + cache_valid_time: 43200 + when: ansible_distribution == 'Debian' + + +- name: add eth zurich apt become: true apt_repository: repo: deb https://debian.ethz.ch/debian/ {{ ansible_distribution_release }} main @@ -9,3 +22,11 @@ - ansible_distribution == 'Debian' - ansible_distribution_release == "wheezy" or ansible_distribution_release == "buster" +- name: iremove eth zurich apt + become: true + apt_repository: + repo: deb-src https://debian.ethz.ch/debian/ {{ ansible_distribution_release }} main + state: absent + when: + - not add_ethz | bool + - ansible_distribution == 'Debian' diff --git a/vars/main.yml b/vars/main.yml index 489b48a..2a65ea2 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -47,5 +47,5 @@ fedora_packages: - python3-pip - python3 -playbook_version_number: 8954 # should be over ninethousand +playbook_version_number: 8955 # should be over ninethousand playbook_version_path: '/etc/ansible-version/base-packages_ffbsee_or_chaos-bodensee_github.version'