blse2-public/common-debian/tasks/apt-packages.yml

25 lines
518 B
YAML
Raw Normal View History

2023-05-05 15:47:27 -04:00
---
- name: install new packages
apt:
name: "{{ packages_add }}"
state: latest
- name: remove unneeded packages
apt:
name: "{{ packages_remove }}"
state: absent
purge: yes
- name: ensure services are started and enabled
service:
name: "{{ item }}"
state: started
enabled: yes
loop: "{{ enabled_services }}"
- name: disable needrestrt dpkg integration if present
file:
dest: /usr/lib/needrestart/dpkg-status
mode: o-x,g-x,u-x
when: "'needrestart' in packages_add"