Ignore pre_tasks in second play. 
The thing to note is the usage of hostvars.

On Monday, December 28, 2015 at 12:50:57 AM UTC+5:30, Arbab Nazar wrote:
>
> Here is my problem I need to use one variable 'RDS_SG_NAME' and then 
> append '_id' to it's value to get another variable name which value I 
> want/need. My simple playbook look like this:
>
> ---
> - hosts: localhost
>   connection: local
>   gather_facts: no 
>   vars:
>     abc_id: 'some-value'
>     RDS_SG_NAME: 'abc'
>     RDS_SG_ID: "{{ RDS_SG_NAME +'_id' }}"
>   tasks:
>     - debub: msg="{{ RDS_SG_NAME }}"
>     - debub: msg="{{ RDS_SG_ID }}"
>
> when I run this playbook, it give the values like this: RDS_SG_NAME: abc 
> RDS_SG_ID: abc_id But I want the some-value againt it, can someone point me 
> to the right direction.
>
> Thanks in advance
>

-- 
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/2b9a9c2f-2dcf-4837-adf6-f849a6b0cdd4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to