home-server/roles/_maintenance_start/tasks/main.yml

26 lines
760 B
YAML

---
# The home-server project produces a multi-purpose setup using Ansible.
# Copyright © 2018 Y. Gablin, under the GPL-3.0-or-later license.
# Full licensing information in the LICENSE file, or gnu.org/licences/gpl-3.0.txt if the file is missing.
- name: stop some services
shell: |
for u in \
nextcloud-maintenance.{timer,service} uwsgi@nextcloud.{socket,service} \
dehydrated.{timer,service} \
minidlna.service \
nfs-server.service
do
systemctl stop $u
done
when:
- (inventory_hostname in groups['back'])
- name: stop some services
shell: |
for u in spamassassin.service spamassassin-update.{timer,service}; do
systemctl stop $u
done
when:
- (inventory_hostname in groups['front'])