FAQ
Hi,


I've a SLS that reads the Windows Register

lee_mtscgal:
   module.run:
      - name: reg.read_key
      - hkey: HKEY_LOCAL_MACHINE
      - path: 'SOFTWARE\Paquito\ASPNET\XXXXX\ASPNET_SETREG'
      - key: userName



and when i run "salt COMPUTER2* state.highstate" i receive this output

----------
           ID: lee_mtscgal
     Function: module.run
         Name: reg.read_key
       Result: True
      Comment: Module function reg.read_key executed
      Changes:
               ----------
               ret:
                   djkejdkejlkdjewudoiedlkedlejdlkjdlkjlkj
----------


Whow can i do to read the "ret" output?



Best regards

--
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

  • Joe Healy at Aug 18, 2014 at 7:17 am
    Hi Groves,

    What is your aim?

    if it is just to get the value from the command line, maybe the reg module
    rather than state is more what you need?

    See the example at:

    http://salt.readthedocs.org/en/latest/ref/modules/all/salt.modules.reg.html#salt.modules.reg.read_key

    If you need it in a state, I believe you can use jinja to do something with
    the results of a module.

    Cheers,

    Joe


    On Mon, Aug 18, 2014 at 5:13 PM, Groves wrote:

    Hi,


    I've a SLS that reads the Windows Register

    lee_mtscgal:
    module.run:
    - name: reg.read_key
    - hkey: HKEY_LOCAL_MACHINE
    - path: 'SOFTWARE\Paquito\ASPNET\XXXXX\ASPNET_SETREG'
    - key: userName



    and when i run "salt COMPUTER2* state.highstate" i receive this output

    ----------
    ID: lee_mtscgal
    Function: module.run
    Name: reg.read_key
    Result: True
    Comment: Module function reg.read_key executed
    Changes:
    ----------
    ret:
    djkejdkejlkdjewudoiedlkedlejdlkjdlkjlkj
    ----------


    Whow can i do to read the "ret" output?



    Best regards

    --
    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.
  • Roberto Docampo Suarez at Aug 18, 2014 at 7:25 am
    The IIS configuration of my farm have the prerequisite of some vars on the
    windows register. I want to test if this registry value exists and
    otherwise configure it.

    If a registry exists, the windows registry module returns "ret " on the
    "changes" . But i dont know how to obtain the "changes" element .... to
    process it.

    Best Regards

    On Mon, Aug 18, 2014 at 9:17 AM, Joe Healy wrote:

    Hi Groves,

    What is your aim?

    if it is just to get the value from the command line, maybe the reg module
    rather than state is more what you need?

    See the example at:


    http://salt.readthedocs.org/en/latest/ref/modules/all/salt.modules.reg.html#salt.modules.reg.read_key

    If you need it in a state, I believe you can use jinja to do something
    with the results of a module.

    Cheers,

    Joe


    On Mon, Aug 18, 2014 at 5:13 PM, Groves wrote:

    Hi,


    I've a SLS that reads the Windows Register

    lee_mtscgal:
    module.run:
    - name: reg.read_key
    - hkey: HKEY_LOCAL_MACHINE
    - path: 'SOFTWARE\Paquito\ASPNET\XXXXX\ASPNET_SETREG'
    - key: userName



    and when i run "salt COMPUTER2* state.highstate" i receive this output

    ----------
    ID: lee_mtscgal
    Function: module.run
    Name: reg.read_key
    Result: True
    Comment: Module function reg.read_key executed
    Changes:
    ----------
    ret:
    djkejdkejlkdjewudoiedlkedlejdlkjdlkjlkj
    ----------


    Whow can i do to read the "ret" output?



    Best regards

    --
    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 a topic in the
    Google Groups "Salt-users" group.
    To unsubscribe from this topic, visit
    https://groups.google.com/d/topic/salt-users/klGEUX9Kjxw/unsubscribe.
    To unsubscribe from this group and all its topics, 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.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupsalt-users @
postedAug 18, '14 at 7:13a
activeAug 18, '14 at 7:25a
posts3
users3

People

Translate

site design / logo © 2022 Grokbase