just checked the code, registered variable shoudl also persist across
plays.. please do let us know the verison of ansible and i can check.

- Benno


On Thu, Aug 27, 2015 at 7:43 PM, benno joy <[email protected]> wrote:

> Hi Joseph,
>
> which version of ansible  are you on ?
>
> - Benno
>
>
> On Thu, Aug 27, 2015 at 6:45 PM, Joseph Djomeda <[email protected]>
> wrote:
>
>> Hello Benno,
>>
>> I have tried your suggestion with set_fact but it didn't work.
>> http://pastie.org/10379408 has both the playbook and it's output
>>
>> Best Regards,
>>
>> On Thu, Aug 27, 2015 at 10:07 AM benno joy <[email protected]> wrote:
>>
>>> Hi,
>>>
>>> A registered variable persists only during the play, so maybe you could
>>> make them  facts which persists across plays  as below
>>>
>>> - set_fact:
>>>
>>>      registered_var: "{{ registered_var }}"
>>>
>>>
>>> and then it shoudl be available via hostvars['localhost']
>>>
>>>
>>> - Benno
>>>
>>>
>>>
>>>
>>> On Thu, Aug 27, 2015 at 2:36 PM, Joseph Djomeda <[email protected]>
>>> wrote:
>>>
>>>> Hello All,
>>>>
>>>> I have been struggling for quite a while now sharing some registered
>>>> variables during ec2 instances provisioning hosts: localhost with their
>>>> configuration hosts: tag_Name_tagname of ec2.
>>>>
>>>> Kindly have a look at this sample http://pastie.org/10378851 . In
>>>> hosts: tag_MName_myappdblivemaster , I need to set the hostname of all the
>>>> instances created during - name: Launch myapp DB Instances Availability A
>>>> and - name: Launch myapp DB Instances Availability B.
>>>>
>>>> Because I have not found any way of using the variable myapp_db_ec2_a
>>>> and myapp_db_ec2_b in the other hosts like tag_MName_myappdblivemaster in
>>>> particular, I had to break the run, copy the hostnames from the console and
>>>> paste in in playbook before this can be successful. When I try with
>>>> hostvars['localhost'] , I get basically nothing to work with.
>>>>
>>>> Is there any thing I am missing or it's not possible?
>>>>
>>>> Best Regards,
>>>>
>>> --
>>>> Joseph Kodjo-Kuma Djomeda
>>>> check out my pains at : www.mycodingpains.com
>>>> We become what we think about ourselves........
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Ansible Project" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to [email protected].
>>>> To post to this group, send email to [email protected].
>>>> To view this discussion on the web visit
>>>> https://groups.google.com/d/msgid/ansible-project/CAKDXoaL5WDpGmH2zAB1hthb8suPXXMrCcx2pN2%2BbWhOF22Nz7A%40mail.gmail.com
>>>> <https://groups.google.com/d/msgid/ansible-project/CAKDXoaL5WDpGmH2zAB1hthb8suPXXMrCcx2pN2%2BbWhOF22Nz7A%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>>> .
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Ansible Project" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> To post to this group, send email to [email protected].
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/ansible-project/CAFUV_d7TDVn3k8O%2BT6%3DhujF0exgioU2svpyQGhYFxQ%3D-2e2MkQ%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/ansible-project/CAFUV_d7TDVn3k8O%2BT6%3DhujF0exgioU2svpyQGhYFxQ%3D-2e2MkQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
>> Joseph Kodjo-Kuma Djomeda
>> check out my pains at : www.mycodingpains.com
>> We become what we think about ourselves........
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Ansible Project" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To post to this group, send email to [email protected].
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/ansible-project/CAKDXoa%2BSRnQynmrArCH52XPqzPepuB4pP6Ko-8n3_z5wtkFVhw%40mail.gmail.com
>> <https://groups.google.com/d/msgid/ansible-project/CAKDXoa%2BSRnQynmrArCH52XPqzPepuB4pP6Ko-8n3_z5wtkFVhw%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAFUV_d4wLGjG9XPxAee9aDgY1w8uBwMMcfBd%3Dk30POBuu%2BaHSA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to