"""Tools script that holds a variety of functions"""

import os


def nornir_set_creds(norn, username="admin", password=<PASSWORD>):
    """
    Handler so credentials are not stored in cleartext.
    Thank you Kirk!
    """
    if not username:
        username = os.environ.get("NORNIR_USER")
    if not password:
        password = os.environ.get("<PASSWORD>")

    for host_obj in norn.inventory.hosts.values():
        host_obj.username = username
        host_obj.password = password

"""Tools script that holds a variety of functions"""

import os


def nornir_set_creds(norn, username="admin", password=<PASSWORD>):
    """
    Handler so credentials are not stored in cleartext.
    Thank you Kirk!
    """
    if not username:
        username = os.environ.get("NORNIR_USER")
    if not password:
        password = os.environ.get("<PASSWORD>")

    for host_obj in norn.inventory.hosts.values():
        host_obj.username = username
        host_obj.password = password

Tools script that holds a variety of functions Handler so credentials are not stored in cleartext.     Thank you Kirk!