Move extra_pkgs*-handling to the up2date-debian role.

This commit is contained in:
Andreas B. Mundt 2020-01-21 20:50:18 +01:00
parent e1766a7cfd
commit 29fb8f9420
4 changed files with 22 additions and 28 deletions

View file

@ -1,17 +1,3 @@
- name: install extra packages from stable
apt: name={{ extra_pkgs }} state=latest
- name: add {{ ansible_distribution_release }}-backports
apt_repository:
repo: deb http://deb.debian.org/debian/ {{ ansible_distribution_release }}-backports main
state: present
update_cache: yes
when: extra_pkgs_bpo|length
- name: install extra packages from backports
apt: name={{ extra_pkgs_bpo }} state=latest default_release={{ ansible_distribution_release }}-backports
when: extra_pkgs_bpo|length
## Check which display manager is used: ## Check which display manager is used:
- name: check if gdm3 is installed - name: check if gdm3 is installed
stat: path=/etc/gdm3/daemon.conf stat: path=/etc/gdm3/daemon.conf

View file

@ -52,20 +52,6 @@
## oddjob-mkhomedir works only with sec=sys for the NFSv4 share ## oddjob-mkhomedir works only with sec=sys for the NFSv4 share
- name: install extra packages from stable
apt: name={{ extra_pkgs }} state=latest
- name: add {{ ansible_distribution_release }}-backports
apt_repository:
repo: deb http://deb.debian.org/debian/ {{ ansible_distribution_release }}-backports main
state: present
update_cache: yes
when: extra_pkgs_bpo|length
- name: install extra packages from backports
apt: name={{ extra_pkgs_bpo }} state=latest default_release={{ ansible_distribution_release }}-backports
when: extra_pkgs_bpo|length
- name: provide identities from directory - name: provide identities from directory
template: template:
src: sssd.conf.j2 src: sssd.conf.j2

View file

@ -0,0 +1,2 @@
extra_pkgs: ""
extra_pkgs_bpo: ""

View file

@ -15,3 +15,23 @@
apt: apt:
name: etckeeper name: etckeeper
state: latest state: latest
- name: install extra packages from stable
apt:
name: "{{ extra_pkgs }}"
state: latest
when: extra_pkgs|length
- name: add {{ ansible_distribution_release }}-backports
apt_repository:
repo: deb http://deb.debian.org/debian/ {{ ansible_distribution_release }}-backports main
state: present
update_cache: yes
when: extra_pkgs_bpo|length
- name: install extra packages from backports
apt:
name: "{{ extra_pkgs_bpo }}"
state: latest
default_release: "{{ ansible_distribution_release }}-backports"
when: extra_pkgs_bpo|length