Ok. That works:
---
- name: Configure the EC2 instance
hosts: ec2hosts
gather_facts: true
remote_user: "{{ hostvars['localhost']['ruser'] }}"
tasks:
- do something......
That seems somewhat sub-optimal but since I'm generating all the vars
dynamically (via set_fact or
include_vars based on parameterized pathnames ) in previous steps of the
same playbook, I don't see any other
way to handle this if I want things to execute in one invocation of a
playbook.
On Friday, November 20, 2015 at 3:40:35 PM UTC-6, Brian Coca wrote:
>
> vars should still be there though,
> hostvars['original_host']['varname'] should allow you to see the var
> from another host.
>
> --
> Brian Coca
>
--
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/0ed542cd-98c1-46b5-9aa5-4b9547712af0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.