You are getting an error because you are passing a string, the
'register' keyword is 'host specific' since the host in both plays is
'localhost' it is directly accessible, you should have:
vpc_subnet_id: "{{public_subnet}}"
--
--
Brian Coca
--
You received this message because you
Hello,
I'm new to ansible and am trying to use import_playbook and register but it
is not working. I have a playbook called vpc.yml:
- hosts: localhost
tasks:
- import_role:
name: vpc
vars:
aws_region: "{{aws_region}}"
register: public_subnet
within another playbook:
- import_playbook: