Skip to content

Masterless orchestration with salt-ssh #55755

@peterhirn

Description

@peterhirn

Description of Issue

I'd like to use masterless orchestration with salt-ssh minions. Currently the target is completely ignored and the state is executed on the local machine.

Setup

test.sls

hostname:
  cmd.run

orchestrate.sls

nodes:
  salt.state:
    - tgt: "node*"
    - ssh: True
    - sls:
      - test

salt-ssh is working:

salt-ssh node01 state.apply test
...
node01:
----------
          ID: hostname
    Function: cmd.run
      Result: True
     Comment: Command "hostname" run
     Started: 18:42:36.315426
    Duration: 8.085 ms
     Changes:   
              ----------
              pid:
                  750
              retcode:
                  0
              stderr:
              stdout:
                  node01

Steps to Reproduce Issue

salt-call --local state.orchestrate orchestrate

local:
    ----------
    data:
        ----------
        provision:
            ----------
            salt_|-nodes_|-nodes_|-state:
                ----------
                __id__:
                    nodes
                __run_num__:
                    0
                __sls__:
                    orchestrate
                changes:
                    ----------
                    out:
                        highstate
                    ret:
                        ----------
                        provision:
                            ----------
                            cmd_|-hostname_|-hostname_|-run:
                                ----------
                                __id__:
                                    hostname
                                __run_num__:
                                    0
                                __sls__:
                                    test
                                changes:
                                    ----------
                                    pid:
                                        703
                                    retcode:
                                        0
                                    stderr:
                                    stdout:
                                        99eb1e77c3d8
                                comment:
                                    Command "hostname" run
                                duration:
                                    7.601
                                name:
                                    hostname
                                result:
                                    True
                                start_time:
                                    22:55:38.449817
                comment:
                    States ran successfully. Updating provision.
                duration:
                    175.38
                name:
                    nodes
                result:
                    True
                start_time:
                    22:55:38.297114
    outputter:
        highstate
    retcode:
        0

Versions Report

Salt Version:
           Salt: 2019.2.0     

Dependency Versions:
           cffi: 1.11.5       
       cherrypy: Not Installed
       dateutil: 2.7.3        
      docker-py: Not Installed
          gitdb: Not Installed
      gitpython: Not Installed
          ioflo: Not Installed
         Jinja2: 2.10
        libgit2: 0.28.2       
        libnacl: Not Installed
       M2Crypto: Not Installed
           Mako: Not Installed
   msgpack-pure: Not Installed
 msgpack-python: 0.6.1        
   mysql-python: Not Installed
      pycparser: 2.19
       pycrypto: 2.6.1
   pycryptodome: Not Installed
         pygit2: 0.28.2
         Python: 3.7.5 (default, Oct 17 2019, 12:25:15)
   python-gnupg: Not Installed
         PyYAML: 5.1.1
          PyZMQ: 18.0.1
           RAET: Not Installed
          smmap: Not Installed
        timelib: Not Installed
        Tornado: 4.5.2
            ZMQ: 4.3.2

System Versions:
           dist:
         locale: UTF-8
        machine: x86_64
        release: 4.9.184-linuxkit
         system: Linux
        version: Not Installed

Metadata

Metadata

Assignees

No one assigned

    Labels

    Featurenew functionality including changes to functionality and code refactors, etc.QuestionThe issue is more of a question rather than a bug or a feature request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions