Use yum module to install nginx. Need to install dependent rpms as well.
Add custom hostname module and modify hostname task to use it.