Update hostname based on IP

Hi,
I would like to update hostname based on server IP.
In my ansible host, I have a group that includes 5 servers IP, for each server, I will need to define hostname name based on the IP.

[web server]
130.1.1.1
130.1.1.2

130.1.1.3

130.1.1.4

130.1.1.5

130.1.1.1 >> web-1
130.1.1.2 >> web-2

130.1.1.3 >> web-3

130.1.1.4 >> web-4

130.1.1.5 >> web-5

https://docs.ansible.com/ansible/latest/modules/hostname_module.html

‪On Wed, 22 Jan 2020 at 09:17, ‫דודו דודו‬‎ <dudu.confirm@gmail.com> wrote:‬