# Replace portion of host name

**URL:** <https://forum.ansible.com/t/replace-portion-of-host-name/24741>\
**Category:** Ansible Project\
**Created:** [June 16, 2017, 12:38am UTC](https://forum.ansible.com/t/replace-portion-of-host-name/24741 "2017-06-16T00:38:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bill\_L](https://avatars.discourse-cdn.com/v4/letter/b/ba8739/32.png) [@Bill\_L](https://forum.ansible.com/u/Bill_L)\
**Post date:** [June 16, 2017, 12:38am UTC](https://forum.ansible.com/t/replace-portion-of-host-name/24741/1 "2017-06-16T00:38:02Z")

</div>

Hello,  
I am new to Ansible and have a question regarding modifying an EC2 host name during the EC2 creation process. I am using the ec2 module to create an EC2 instance as shown below. Is it possible to replace the ec2-user part of the host name with another name like Michael@ec2-#######? It does not look like this can be done using the ec2 module.  
Thank you,  
Bill

[![](https://lh3.googleusercontent.com/-cpqMuNU-IMk/WUMn7Z93LWI/AAAAAAAA8jg/N_QESq3giFgNxnxcuGtWPJxNYZjSkf_9QCLcBGAs/s1600/ec-2%2Bhost%2Bname.png)](https://lh3.googleusercontent.com/-cpqMuNU-IMk/WUMn7Z93LWI/AAAAAAAA8jg/N_QESq3giFgNxnxcuGtWPJxNYZjSkf_9QCLcBGAs/s1600/ec-2%2Bhost%2Bname.png)
