def save_nameserver_ip(instance, filepath="/etc/resolv.conf"):
    """ Save ip in /etc/resolv.conf in a list """
    nameservers_ip = []
    nameservers = instance.execute(["cat", filepath]).stdout.split("\n")
    for nameserver in nameservers:
        nameserver = nameserver.split(" ")
        if len(nameserver) == 2 and nameserver[0] == "nameserver":
            nameservers_ip.append(nameserver[1])
    return nameservers_ip