FAQ
Hello,
Accessing Salt client API on Linux platform is easy. According the document
http://docs.saltstack.com/en/latest/ref/clients/, it is sufficient to just
import respective Salt modules which are installed into Python run-time
environment. But what about Windows platform where Salt is distributed with
its own Python run-time? Does anybody know how to access it?

Thanks.

--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

  • Sam Lai at Mar 10, 2015 at 10:30 pm
    You can just set your PYTHONPATH (or sys.path) to point to the package
    directory for Salt to use the Salt modules for whatever. What
    specifically are you trying to do?
    On 6 March 2015 at 11:00, David Sumsky wrote:
    Hello,
    Accessing Salt client API on Linux platform is easy. According the document
    http://docs.saltstack.com/en/latest/ref/clients/, it is sufficient to just
    import respective Salt modules which are installed into Python run-time
    environment. But what about Windows platform where Salt is distributed with
    its own Python run-time? Does anybody know how to access it?

    Thanks.

    --
    You received this message because you are subscribed to the Google Groups
    "Salt-users" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to salt-users+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
    --
    You received this message because you are subscribed to the Google Groups "Salt-users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • David Sumsky at Mar 11, 2015 at 12:37 pm
    Let's say, I have a python script, I want to access salt modules and to
    call directly some execution module. Currently, this works easily on Linux
    only, according this page -
    http://docs.saltstack.com/en/latest/ref/clients/ . Not sure, how to achieve
    the same on Windows. I can see related salt python libraries under the
    directory c:\salt\salt-VERSION but if I upgrade it it will be then
    c:\salt\salt-VERSION_NEW so I can't write something generic like

    sys.path.append('c:\salt\salt-libs')
    import salt-config


    Dne úterý 10. března 2015 23:30:38 UTC+1 Sam Lai napsal(a):
    You can just set your PYTHONPATH (or sys.path) to point to the package
    directory for Salt to use the Salt modules for whatever. What
    specifically are you trying to do?

    On 6 March 2015 at 11:00, David Sumsky <dsu...@gmail.com <javascript:>>
    wrote:
    Hello,
    Accessing Salt client API on Linux platform is easy. According the document
    http://docs.saltstack.com/en/latest/ref/clients/, it is sufficient to just
    import respective Salt modules which are installed into Python run-time
    environment. But what about Windows platform where Salt is distributed with
    its own Python run-time? Does anybody know how to access it?

    Thanks.

    --
    You received this message because you are subscribed to the Google Groups
    "Salt-users" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to salt-users+...@googlegroups.com <javascript:>.
    For more options, visit https://groups.google.com/d/optout.
    --
    You received this message because you are subscribed to the Google Groups "Salt-users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • David Sumsky at Mar 11, 2015 at 12:38 pm
    sorry, typo:
    import salt.config

    Dne středa 11. března 2015 13:37:27 UTC+1 David Sumsky napsal(a):
    Let's say, I have a python script, I want to access salt modules and to
    call directly some execution module. Currently, this works easily on Linux
    only, according this page -
    http://docs.saltstack.com/en/latest/ref/clients/ . Not sure, how to
    achieve the same on Windows. I can see related salt python libraries under
    the directory c:\salt\salt-VERSION but if I upgrade it it will be then
    c:\salt\salt-VERSION_NEW so I can't write something generic like

    sys.path.append('c:\salt\salt-libs')
    import salt-config


    Dne úterý 10. března 2015 23:30:38 UTC+1 Sam Lai napsal(a):
    You can just set your PYTHONPATH (or sys.path) to point to the package
    directory for Salt to use the Salt modules for whatever. What
    specifically are you trying to do?
    On 6 March 2015 at 11:00, David Sumsky wrote:
    Hello,
    Accessing Salt client API on Linux platform is easy. According the document
    http://docs.saltstack.com/en/latest/ref/clients/, it is sufficient to just
    import respective Salt modules which are installed into Python run-time
    environment. But what about Windows platform where Salt is distributed with
    its own Python run-time? Does anybody know how to access it?

    Thanks.

    --
    You received this message because you are subscribed to the Google Groups
    "Salt-users" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to salt-users+...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
    --
    You received this message because you are subscribed to the Google Groups "Salt-users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Loren Gordon at Mar 11, 2015 at 1:21 pm
    Perhaps the salt installer for windows could set an environment variable
    that points to salt's python libraries? You could then pull that env
    variable into your python script so that you can find and import the salt
    modules?

    -Loren

    On Wednesday, March 11, 2015 at 8:38:07 AM UTC-4, David Sumsky wrote:

    sorry, typo:
    import salt.config

    Dne středa 11. března 2015 13:37:27 UTC+1 David Sumsky napsal(a):
    Let's say, I have a python script, I want to access salt modules and to
    call directly some execution module. Currently, this works easily on Linux
    only, according this page -
    http://docs.saltstack.com/en/latest/ref/clients/ . Not sure, how to
    achieve the same on Windows. I can see related salt python libraries under
    the directory c:\salt\salt-VERSION but if I upgrade it it will be then
    c:\salt\salt-VERSION_NEW so I can't write something generic like

    sys.path.append('c:\salt\salt-libs')
    import salt-config


    Dne úterý 10. března 2015 23:30:38 UTC+1 Sam Lai napsal(a):
    You can just set your PYTHONPATH (or sys.path) to point to the package
    directory for Salt to use the Salt modules for whatever. What
    specifically are you trying to do?
    On 6 March 2015 at 11:00, David Sumsky wrote:
    Hello,
    Accessing Salt client API on Linux platform is easy. According the document
    http://docs.saltstack.com/en/latest/ref/clients/, it is sufficient to just
    import respective Salt modules which are installed into Python run-time
    environment. But what about Windows platform where Salt is distributed with
    its own Python run-time? Does anybody know how to access it?

    Thanks.

    --
    You received this message because you are subscribed to the Google Groups
    "Salt-users" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to salt-users+...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
    --
    You received this message because you are subscribed to the Google Groups "Salt-users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupsalt-users @
postedMar 6, '15 at 11:00a
activeMar 11, '15 at 1:21p
posts5
users3

People

Translate

site design / logo © 2022 Grokbase