25 lines
518 B
YAML
25 lines
518 B
YAML
---
|
|
- 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"
|