Setting windows host/machine name using ansible

Hi,

is there a way in ansible to set the name of the windows host when we are creating the ec2 instance or maybe change it afterwards?

Thanks
Ali

You can use ec2_tags.

win_domain_user requires a domain_server parameter. i need to retrieve the server name from the newly created ec2 instance to use in this command.