2023-11-13 14:33:28 +00:00
|
|
|
{#
|
2025-01-08 15:52:34 +01:00
|
|
|
SPDX-FileCopyrightText: 2023 - 2025 Benjamin Grande M. S. <ben.grande.b@gmail.com>
|
2023-11-13 14:33:28 +00:00
|
|
|
|
|
|
|
SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
#}
|
|
|
|
|
|
|
|
{% if grains['nodename'] != 'dom0' -%}
|
|
|
|
{% for unused_dir in ['Desktop','Documents','Downloads','Music','Pictures','Public','Templates','Videos'] -%}
|
|
|
|
|
|
|
|
{% set full_unused_dir = '/home/user/' ~ unused_dir -%}
|
|
|
|
"remove-{{ full_unused_dir }}":
|
|
|
|
file.absent:
|
|
|
|
- name: {{ full_unused_dir }}
|
2025-01-08 15:52:34 +01:00
|
|
|
- onlyif: test -z "$(ls -A -- {{ full_unused_dir }})"
|
2023-11-13 14:33:28 +00:00
|
|
|
|
|
|
|
{% endfor -%}
|
|
|
|
{% endif -%}
|