register: test
- debug: msg="{{test.stdout}}"
tasks: - shell: cat "{{test.stdout}}"
--
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 ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/51b1da39-f24c-454d-8f93-eb332c8c4b23%40googlegroups.com.
Not tried yet, but this describes a dummy host:
https://stackoverflow.com/a/47811099/12731515
On Thu, 21 May 2020 at 17:56, Jeremy Hobbs <gly...@gmail.com> wrote:
>
> I simplified the playbook for the post. But, this specific call is used by many different playbooks. So instead of having to update each playbook if it changes, I want to abstract it out. Writing to a file seems a pretty crappy workaround. Is there not a way to pass variables between the playbooks directly?
>
>
>
> On Thursday, May 21, 2020 at 10:49:04 AM UTC-5, David Foley wrote:
>>
>> Why two Playbook ?
>>
>> But either way, Copy the Reg to a Local Json File
>>
>> Then in your Second Playbook Just read in the JSON File
>>
>> name: Read Json File
>> shell: cat Info.json
>> register: json_file
>>
>>
>> (json_file.stdout | from_json).VALUE
>
> --
> 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 ansible...@googlegroups.com.