installiere *.deb aus dem Internet (#256)

Co-authored-by: Michael Grote <michael.grote@posteo.de>
Reviewed-on: mg/ansible#256
Co-authored-by: mg <michael.grote@posteo.de>
Co-committed-by: mg <michael.grote@posteo.de>
This commit is contained in:
Michael Grote 2021-11-27 23:39:02 +01:00
parent 642b56d465
commit ddae32ea0a
4 changed files with 19 additions and 8 deletions

View file

@ -205,7 +205,6 @@
- apt-transport-https
- neofetch
- moreutils
- ntpdate
- acl
- vim
- rsync
@ -223,6 +222,8 @@
- open-vm-tools
apt_packages_absent:
- nano
apt_packages_internet:
- https://git.mgrote.net/mg/bash-helper-scripts-mgrote/raw/branch/master/output/bash-helper-scripts-mgrote-latest.deb

View file

@ -6,23 +6,24 @@ Fuehrt:
aus.
```yaml
apt_packages_common:
- locales
- wird überall installiert
apt_packages_physical:
- hddtemp
- nur auf Hardware-Maschinen
apt_packages_vm:
- qemu-guest-agent
- nur in VMs
apt_packages_extra:
- Extra-Parameter für einzelne Hosts
apt_packages_internet:
- für URLs
- https://git.mgrote.net/mg/bash-helper-scripts-mgrote/raw/branch/master/output/bash-helper-scripts-mgrote-latest.deb
```
Es wird unterschieden ob das Ziel eine VM ist oder nicht.
### getestet auf
- [x] Ubuntu (>=18.04)
- [x] Debian
- [x] ProxMox 6.1
- [x] Ubuntu (>=20.04)
- [x] ProxMox 7*
### Variablen + Defaults
- siehe default/main.yml
- siehe [defaults/main.yml](./defaults/main.yml)

View file

@ -32,3 +32,4 @@
- open-vm-tools
apt_packages_extra:
apt_packages_absent:
apt_packages_internet:

View file

@ -26,6 +26,14 @@
state: present
when: ansible_virtualization_role != 'guest'
- name: install packages from the internet
become: yes
ansible.builtin.apt:
deb: "{{ item }}"
state: present
when: apt_packages_internet is defined
loop: "{{ apt_packages_internet }}"
- name: remove packages
become: yes
ansible.builtin.package: