Never mind I found an answer:
tasks:
- name: echo redis ip
debug: msg="redis ip {{
hostvars[groups['tag_role_redis'][0]]['ec2_private_ip_address'] }}"
On Wednesday, January 7, 2015 9:14:58 AM UTC-5, Sergey Dobrovolskiy wrote:
>
> Hi are there any updates on this topic?
>
> My use case is the following:
> I'm provisioning Redis server on EC2, after it's done, I'm running
> ec2_facts module to get the private IP.
> Later in the infrastructure provisioning I want to be able to use that
> IP.
>
> Thanks,
> Sergey
>
> On Wednesday, October 9, 2013 2:27:30 AM UTC-4, [email protected] wrote:
>>
>> Any update on retaining CloudFormation outputs?
>>
>> I'm working very intently on making a multi-az multi-tier h/a-minded
>> multi-VPC CloudFormation framework, using cfndsl
>> <https://github.com/howech/cfndsl> syntax, deployed strictly with
>> Ansible playbooks. (or a custom module, if it comes to that)
>>
>> Rather than using natively nested templates which require to be on S3
>> hosting, and due to the tiny limits placed on CloudFormation (10 output
>> values, 51,200 bytes per template), I'm looking to execute
>> (idempotently-possible) interlocking CloudFormation templates which pass
>> outputs as parameters to other templates.
>>
>> cfndsl provides the mechanism for doing for each loops to generate
>> subnets, routes, route tables, etc. for each tier. At the end of this,
>> I'll be building a 10-tier 3-zone h/a VPC for application deployment plus a
>> 2 or 3 tier, 3-zone h/a VPC for "universe" management (Ansible will live
>> there).
>>
>> The goal is to do something like OpsWorks with Ansible, but with cfndsl
>> and multi-tier VPC's in mind. For VPC's an abstraction of "tier" is what I
>> think most people would really like. OpsWorks uses "layers" for this, but
>> they are just barely VPC aware.
>>
>> Thanks,
>> Joshua
>>
>>
>> On Wednesday, July 17, 2013 9:06:35 PM UTC-4, Michael DeHaan wrote:
>>>
>>> If you have one play firing after the other from the same playbook, you
>>> are of course fine.
>>>
>>>
>>>
>>> On Wed, Jul 17, 2013 at 9:06 PM, Michael DeHaan <[email protected]
>>> > wrote:
>>>
>>>> I have an open ticket to cache these (optionally) between runs.
>>>>
>>>> Right now, you cannot.
>>>>
>>>>
>>>>
>>>>
>>>> On Wed, Jul 17, 2013 at 7:37 PM, Boris <[email protected]> wrote:
>>>>
>>>>> Can I save a variable in one playbook, so it can be used by another
>>>>> one at a later time?
>>>>> For example: playbook running cloudformation server provisioning task
>>>>> outputs some info that later needs to be used by playbook configuring
>>>>> software on those servers.
>>>>>
>>>>> I guess I could just use lineinfile on a vars file to update a
>>>>> variable there, but may be there is a better way?
>>>>>
>>>>> Thanks,
>>>>> -Boris
>>>>>
>>>>> --
>>>>> 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].
>>>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Michael DeHaan <[email protected]>
>>>> CTO, AnsibleWorks, Inc.
>>>> http://www.ansibleworks.com/
>>>>
>>>>
>>>
>>>
>>> --
>>> Michael DeHaan <[email protected]>
>>> CTO, AnsibleWorks, Inc.
>>> http://www.ansibleworks.com/
>>>
>>>
--
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/7f1c3808-89db-43e2-920c-9c226c2be70e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.