FAQ
I currently have a pilar item in the form of
     websvrprod-ips:
         ----------
         server3:
             192.168.6.103
         server2:
             192.168.6.102
         server1:
             192.168.6.101

Is there some way to match the ID of the salt minion with the pillar item
and get the value?

For example, if I am running the SLS on server1, I want to be able to use
{{ haproxyip }} to retrieve 192.168.6.101, and 192.168.6.102 on server2.

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

  • Stephen Spencer at Oct 3, 2014 at 5:40 pm
    Celene,

    The state is running on server1--you want to be able to access the other
    servers' IP addresses via the haproxyip object within the state running on
    server1. Is that correct?

    -S
    On Thu, Oct 2, 2014 at 11:36 PM, Celene B wrote:

    I currently have a pilar item in the form of
    websvrprod-ips:
    ----------
    server3:
    192.168.6.103
    server2:
    192.168.6.102
    server1:
    192.168.6.101

    Is there some way to match the ID of the salt minion with the pillar item
    and get the value?

    For example, if I am running the SLS on server1, I want to be able to use
    {{ haproxyip }} to retrieve 192.168.6.101, and 192.168.6.102 on server2.

    --
    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 know, I used to think it was awful that life was so unfair. Then I
    thought, wouldn't it be much worse if life were fair, and all the terrible
    things that happen to us come because we actually deserve them? So, now I
    take great comfort in the general hostility and unfairness of the universe.

    --
    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.
  • Celene B at Oct 3, 2014 at 8:16 pm
    Yes, this is correct
    On Friday, October 3, 2014 10:40:18 AM UTC-7, Stephen Spencer wrote:

    Celene,

    The state is running on server1--you want to be able to access the other
    servers' IP addresses via the haproxyip object within the state running on
    server1. Is that correct?

    -S

    On Thu, Oct 2, 2014 at 11:36 PM, Celene B <cele...@gmail.com <javascript:>
    wrote:
    I currently have a pilar item in the form of
    websvrprod-ips:
    ----------
    server3:
    192.168.6.103
    server2:
    192.168.6.102
    server1:
    192.168.6.101

    Is there some way to match the ID of the salt minion with the pillar item
    and get the value?

    For example, if I am running the SLS on server1, I want to be able to use
    {{ haproxyip }} to retrieve 192.168.6.101, and 192.168.6.102 on server2.

    --
    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 know, I used to think it was awful that life was so unfair. Then I
    thought, wouldn't it be much worse if life were fair, and all the terrible
    things that happen to us come because we actually deserve them? So, now I
    take great comfort in the general hostility and unfairness of the universe.
    --
    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.
  • Colton Myers at Nov 3, 2014 at 8:52 pm
    I may be misunderstanding what you're trying to do, but you might look into storing those IPs in the Mine:

    http://docs.saltstack.com/en/latest/topics/mine/ <http://docs.saltstack.com/en/latest/topics/mine/>

    --
    Colton Myers (basepi)
    Platform Engineer, SaltStack
    On Oct 3, 2014, at 2:16 PM, Celene B wrote:

    Yes, this is correct

    On Friday, October 3, 2014 10:40:18 AM UTC-7, Stephen Spencer wrote:
    Celene,

    The state is running on server1--you want to be able to access the other servers' IP addresses via the haproxyip object within the state running on server1. Is that correct?

    -S

    On Thu, Oct 2, 2014 at 11:36 PM, Celene B <cele...@gmail.com <javascript:>> wrote:
    I currently have a pilar item in the form of
    websvrprod-ips:
    ----------
    server3:
    192.168.6.103
    server2:
    192.168.6.102
    server1:
    192.168.6.101

    Is there some way to match the ID of the salt minion with the pillar item and get the value?

    For example, if I am running the SLS on server1, I want to be able to use {{ haproxyip }} to retrieve 192.168.6.101, and 192.168.6.102 on server2.

    --
    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 <https://groups.google.com/d/optout>.



    --
    You know, I used to think it was awful that life was so unfair. Then I thought, wouldn't it be much worse if life were fair, and all the terrible things that happen to us come because we actually deserve them? So, now I take great comfort in the general hostility and unfairness of the universe.

    --
    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 <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 @
postedOct 3, '14 at 4:36a
activeNov 3, '14 at 8:52p
posts4
users3

People

Translate

site design / logo © 2022 Grokbase