# tcp port assignments

**URL:** <https://forum.ansible.com/t/tcp-port-assignments/14452>\
**Category:** Ansible Project\
**Created:** [January 29, 2014, 1:37pm UTC](https://forum.ansible.com/t/tcp-port-assignments/14452 "2014-01-29T13:37:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Damjan\_Georgievski](https://avatars.discourse-cdn.com/v4/letter/d/e19b73/32.png) [@Damjan\_Georgievski](https://forum.ansible.com/u/Damjan_Georgievski)\
**Post date:** [January 29, 2014, 1:37pm UTC](https://forum.ansible.com/t/tcp-port-assignments/14452/1 "2014-01-29T13:37:30Z")

</div>

For some of my applications I need to generate a TCP port number, which then I would use in templates for config files. Since there are more than one of this application on a host the port number must be unique, and will need to be permanently stored somewhere.

Has anyone done something like this already? A generate-and-store module maybe?  
Something similar could be used for passwords and secrets too I guess.
