code: def get_public_ip(self):
          
          r = self.local_renderer
          ret = r.run(r.env.get_public_ip_command) or ''
          ret = ret.strip()
          print('ip:', ret)
          return ret
docs: Gets the public IP for a host.