mirror of
https://github.com/roles-ansible/ansible_role_packages.git
synced 2024-08-16 10:19:51 +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
|
# - foo
|
||||||
# - bar
|
# - bar
|
||||||
|
|
||||||
|
# should we add additional package source?
|
||||||
base__add_ethz: "{{ add_ethz }}"
|
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:
|
when:
|
||||||
- ansible_os_family == 'Debian'
|
- ansible_os_family == 'Debian'
|
||||||
- base__add_ethz | bool
|
- base__add_ethz | bool
|
||||||
|
- ansible_architecture == 'x86_64'
|
||||||
|
|
||||||
- name: Install common base packages [Debian]
|
- name: Install common base packages [Debian]
|
||||||
become: yes
|
become: yes
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
---
|
---
|
||||||
- name: Install some common Debian specific packages
|
- name: Install requirements to add packages
|
||||||
become: yes
|
become: true
|
||||||
apt:
|
apt:
|
||||||
package:
|
package:
|
||||||
- debian-goodies
|
- debian-goodies
|
||||||
|
@ -12,62 +12,32 @@
|
||||||
when:
|
when:
|
||||||
- ansible_machine != 'armv6l' and ansible_distribution_release != 'wheezy'
|
- ansible_machine != 'armv6l' and ansible_distribution_release != 'wheezy'
|
||||||
|
|
||||||
- name: add eth zurich apt
|
- name: add eth zurich apt (main)
|
||||||
become: true
|
become: true
|
||||||
apt_repository:
|
apt_repository:
|
||||||
repo: deb https://debian.ethz.ch/debian/ {{ ansible_distribution_release }} main
|
repo: deb https://debian.ethz.ch/debian/ {{ ansible_distribution_release }} main
|
||||||
state: present
|
state: present
|
||||||
when:
|
when:
|
||||||
- not base_pkg_non_free_firmware | bool
|
- not base__pkg_non_free_firmware | bool
|
||||||
- not base_pkg_contrib | bool
|
- not base__pkg_contrib | bool
|
||||||
- add_ethz | bool
|
|
||||||
- ansible_distribution == 'Debian'
|
|
||||||
- ansible_machine != 'armv6l' and ansible_distribution_release != 'wheezy'
|
- ansible_machine != 'armv6l' and ansible_distribution_release != 'wheezy'
|
||||||
|
|
||||||
- name: add eth zurich apt
|
- name: add eth zurich apt (main non-free)
|
||||||
become: true
|
become: true
|
||||||
apt_repository:
|
apt_repository:
|
||||||
repo: deb-src https://debian.ethz.ch/debian/ {{ ansible_distribution_release }} main non-free
|
repo: deb-src https://debian.ethz.ch/debian/ {{ ansible_distribution_release }} main non-free
|
||||||
state: present
|
state: present
|
||||||
when:
|
when:
|
||||||
- base_pkg_non_free_firmware | bool
|
- base__pkg_non_free_firmware | bool
|
||||||
- not base_pkg_contrib | bool
|
- not base__pkg_contrib | bool
|
||||||
- add_ethz | bool
|
|
||||||
- ansible_distribution == 'Debian'
|
|
||||||
- ansible_machine != 'armv6l' and ansible_distribution_release != 'wheezy'
|
- ansible_machine != 'armv6l' and ansible_distribution_release != 'wheezy'
|
||||||
|
|
||||||
- name: remove eth zurich apt
|
- 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 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
|
|
||||||
become: true
|
become: true
|
||||||
apt_repository:
|
apt_repository:
|
||||||
repo: deb-src https://debian.ethz.ch/debian/ {{ ansible_distribution_release }} main contrib non-free
|
repo: deb-src https://debian.ethz.ch/debian/ {{ ansible_distribution_release }} main contrib non-free
|
||||||
state: present
|
state: present
|
||||||
when:
|
when:
|
||||||
- base_pkg_non_free_firmware | bool
|
- base__pkg_non_free_firmware | bool
|
||||||
- base_pkg_contrib | 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'
|
|
||||||
- ansible_machine != 'armv6l' and ansible_distribution_release != 'wheezy'
|
- ansible_machine != 'armv6l' and ansible_distribution_release != 'wheezy'
|
||||||
|
|
Loading…
Reference in a new issue