# Use of ansible module input parameters in subsequent tasks

**URL:** <https://forum.ansible.com/t/use-of-ansible-module-input-parameters-in-subsequent-tasks/36823>\
**Category:** Ansible Project\
**Tags:** aws\
**Created:** [July 11, 2022, 8:21am UTC](https://forum.ansible.com/t/use-of-ansible-module-input-parameters-in-subsequent-tasks/36823 "2022-07-11T08:21:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Akshay\_Jadhav](https://avatars.discourse-cdn.com/v4/letter/a/e0b2c6/32.png) [@Akshay\_Jadhav](https://forum.ansible.com/u/Akshay_Jadhav)\
**Post date:** [July 11, 2022, 8:21am UTC](https://forum.ansible.com/t/use-of-ansible-module-input-parameters-in-subsequent-tasks/36823/1 "2022-07-11T08:21:53Z")

</div>

Hi,

I want to use region attribute from below task for subsequent task but that attribute is not a part of output , so how I can use it next tasks.

- name: get aws vpc detailsec2\_vpc\_net\_info:  
aws\_access\_key: ##########  
aws\_secret\_key: #########  
region: us-east-1  
register: aws\_output

Region is input to the given module so I want to print that region. Please guide me how to print region its not a part of register. Thank you.

---

<div class="post-metadata">

**Author:** ![Akasurde](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/akasurde/32/230_2.png) [@Akasurde](https://forum.ansible.com/u/Akasurde)\
**Post date:** [July 11, 2022, 8:33am UTC](https://forum.ansible.com/t/use-of-ansible-module-input-parameters-in-subsequent-tasks/36823/2 "2022-07-11T08:33:17Z")

</div>

You can create a temporary variable to store both region and register value and then access that in subsequent tasks.

For example,

…

vars:  
vpcs:  
…  
tasks:

- name: Update register variable  
set\_fact:  
new\_vpcs: “{{ vpcs | combine({‘region’: ‘us-east-1’ }) }}”

…
