mirror of
https://github.com/roles-ansible/ansible_role_base.git
synced 2024-08-16 14:29:50 +02:00
Cleanup package addition
This commit is contained in:
parent
08b6f7f24b
commit
0f34555f8b
3 changed files with 18 additions and 41 deletions
|
@ -4,8 +4,14 @@ base__extra_packages: []
|
|||
# - foo
|
||||
# - bar
|
||||
|
||||
# should we add additional package source?
|
||||
base__add_ethz: "{{ add_ethz }}"
|
||||
# add nonfree/firmware packages?
|
||||
base__pkg_non_free_firmware: "{{ base_pkg_non_free_firmware }}"
|
||||
base__pkg_contrib: "{{ base_pkg_contrib }}"
|
||||
|
||||
# optionaly print some OS vars
|
||||
base__print_os_vars: "{{ print_os_vars }}"
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
when:
|
||||
- ansible_os_family == 'Debian'
|
||||
- base__add_ethz | bool
|
||||
- ansible_architecture == 'x86_64'
|
||||
|
||||
- name: Install common base packages [Debian]
|
||||
become: yes
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
- name: Install some common Debian specific packages
|
||||
become: yes
|
||||
- name: Install requirements to add packages
|
||||
become: true
|
||||
apt:
|
||||
package:
|
||||
- debian-goodies
|
||||
|
@ -12,62 +12,32 @@
|
|||
when:
|
||||
- ansible_machine != 'armv6l' and ansible_distribution_release != 'wheezy'
|
||||
|
||||
- name: add eth zurich apt
|
||||
- name: add eth zurich apt (main)
|
||||
become: true
|
||||
apt_repository:
|
||||
repo: deb https://debian.ethz.ch/debian/ {{ ansible_distribution_release }} main
|
||||
state: present
|
||||
when:
|
||||
- not base_pkg_non_free_firmware | bool
|
||||
- not base_pkg_contrib | bool
|
||||
- add_ethz | bool
|
||||
- ansible_distribution == 'Debian'
|
||||
- not base__pkg_non_free_firmware | bool
|
||||
- not base__pkg_contrib | bool
|
||||
- ansible_machine != 'armv6l' and ansible_distribution_release != 'wheezy'
|
||||
|
||||
- name: add eth zurich apt
|
||||
- name: add eth zurich apt (main non-free)
|
||||
become: true
|
||||
apt_repository:
|
||||
repo: deb-src https://debian.ethz.ch/debian/ {{ ansible_distribution_release }} main non-free
|
||||
state: present
|
||||
when:
|
||||
- base_pkg_non_free_firmware | bool
|
||||
- not base_pkg_contrib | bool
|
||||
- add_ethz | bool
|
||||
- ansible_distribution == 'Debian'
|
||||
- base__pkg_non_free_firmware | bool
|
||||
- not base__pkg_contrib | bool
|
||||
- ansible_machine != 'armv6l' and ansible_distribution_release != 'wheezy'
|
||||
|
||||
- name: remove eth zurich apt
|
||||
become: true
|
||||
apt_repository:
|
||||
repo: deb-src https://debian.ethz.ch/debian/ {{ ansible_distribution_release }} main non-free
|
||||
state: absent
|
||||
when:
|
||||
- base_pkg_non_free_firmware | bool
|
||||
- not base_pkg_contrib | bool
|
||||
- not add_ethz | bool
|
||||
- ansible_distribution == 'Debian'
|
||||
- ansible_machine != 'armv6l' and ansible_distribution_release != 'wheezy'
|
||||
|
||||
- name: add eth zurich apt + contrib + non-free
|
||||
- name: add eth zurich apt (main contrib non-free)
|
||||
become: true
|
||||
apt_repository:
|
||||
repo: deb-src https://debian.ethz.ch/debian/ {{ ansible_distribution_release }} main contrib non-free
|
||||
state: present
|
||||
when:
|
||||
- base_pkg_non_free_firmware | bool
|
||||
- base_pkg_contrib | bool
|
||||
- add_ethz | bool
|
||||
- ansible_distribution == 'Debian'
|
||||
- ansible_machine != 'armv6l' and ansible_distribution_release != 'wheezy'
|
||||
|
||||
- name: remove eth zurich apt + contrib + non-free
|
||||
become: true
|
||||
apt_repository:
|
||||
repo: deb-src https://debian.ethz.ch/debian/ {{ ansible_distribution_release }} main contrib non-free
|
||||
state: absent
|
||||
when:
|
||||
- base_pkg_non_free_firmware | bool
|
||||
- base_pkg_contrib | bool
|
||||
- not add_ethz | bool
|
||||
- ansible_distribution == 'Debian'
|
||||
- base__pkg_non_free_firmware | bool
|
||||
- base__pkg_contrib | bool
|
||||
- ansible_machine != 'armv6l' and ansible_distribution_release != 'wheezy'
|
||||
|
|
Loading…
Reference in a new issue