Skip to content

launching different comands on different servers #6

@freeseacher

Description

@freeseacher

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 ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions