How I can do it using ansible? I wonder if it can be done using gathered facts by ansible?
I would think of , getting the public ip and register as variable and same time get the private ip .
Now, replacing it using replace or inline module. Any best approach ?