I want to stop system on several servers. I have two types of servers insert and storages.
on servers with tag insert i need to run command systemctl stop vm-insert and on storages systemctl stop vm-storage
i've made such config
tasks:
stop-vm-insert:
cmd: |
echo "systemctl stop vm-insert";
....
target:
tags: [insert]
stop-vm-storage:
cmd: |
echo "systemctl stop vm-storage";
....
target:
tags: [ storage ]
stop-daemons:
tasks:
- task: stop-vm-insert
- task: stop-vm-storage
i'm expecting that commands must be issued only on target servers but instead they are run on both target groups.
Any ideas on how to do so ?
I want to stop system on several servers. I have two types of servers insert and storages.
on servers with tag insert i need to run command
systemctl stop vm-insertand on storagessystemctl stop vm-storagei've made such config
i'm expecting that commands must be issued only on target servers but instead they are run on both target groups.
Any ideas on how to do so ?