dd
Some checks failed
ansible-lint / gitleaks (pull_request) Successful in 3s
ansible-lint / Ansible Lint (pull_request) Failing after 25s

This commit is contained in:
Michael Grote 2024-12-29 11:21:06 +01:00
parent e0e32fa75b
commit 40b5321f8d
3 changed files with 6 additions and 17 deletions

View file

@ -1,6 +1,7 @@
## mgrote.apt_manage_packages
### Beschreibung
Fuehrt:
`apt install {{ programme }}`
aus.
@ -13,10 +14,6 @@ aus.
- nur in VMs
apt_packages_extra:
- Extra-Parameter für einzelne Hosts
apt_packages_internet:
- für URLs
- http://docker10.mgrote.net:3344/bash-helper-scripts-mgrote-latest.deb
```
Es wird unterschieden ob das Ziel eine VM ist oder nicht.

View file

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

View file

@ -1,39 +1,32 @@
---
- name: install common-packages
- name: Ensure common-packages are installed
become: true
ansible.builtin.package:
name: "{{ apt_packages_common }}"
state: present
- name: install extra-packages
- name: Ensure extra-packages are installed
become: true
ansible.builtin.package:
name: "{{ apt_packages_extra }}"
state: present
when: apt_packages_extra is defined
- name: install vm-packages
- name: Ensure vm-packages are installed
become: true
ansible.builtin.package:
name: "{{ apt_packages_vm }}"
state: present
when: ansible_virtualization_role == 'guest'
- name: install physical-packages
- name: Ensure physical-packages are installed
become: true
ansible.builtin.package:
name: "{{ apt_packages_physical }}"
state: present
when: ansible_virtualization_role != 'guest'
- name: install packages from the internet
become: true
ansible.builtin.apt:
deb: "{{ apt_packages_internet }}"
state: present
when: apt_packages_internet is defined
- name: remove packages
- name: Ensure packages are removed
become: true
ansible.builtin.package:
name: "{{ apt_packages_absent }}"