Re: [ansible-project] Geting vars from a different playbook to use as the "hosts" value

2014-08-14 Thread Shih Oon Liong
Thanks! - that clarifies it for me. On Thursday, 14 August 2014 04:52:39 UTC-7, Michael DeHaan wrote: > > It's not possible to use inventory variables in the "host" spec ("- > hosts:"). > > Also, don't use debug with register, instead, if you need to set a > variable: > > - set_fact: >fo

Re: [ansible-project] Geting vars from a different playbook to use as the "hosts" value

2014-08-14 Thread Michael DeHaan
It's not possible to use inventory variables in the "host" spec ("- hosts:"). Also, don't use debug with register, instead, if you need to set a variable: - set_fact: foo: "tag_Name_{{ aws.ec2.Name }}" "- hosts: {{ hostvars.localhost.aws_host_target.msg" This is also an error because the

[ansible-project] Geting vars from a different playbook to use as the "hosts" value

2014-08-13 Thread Shih Oon Liong
I am trying to run two playbooks at the same time, with one taking a var from the previous playbook. My code is as follows - name: Provision AWS > hosts: localhost > gather_facts: no > vars_files: > - configs/aws.yml > tasks: > - debug: msg='tag_Name_{{ aws.ec2.Name }}' > r