Skip to content

Commit

Permalink
read config file from env var
Browse files Browse the repository at this point in the history
  • Loading branch information
aabouzaid committed Apr 22, 2017
1 parent f3a7025 commit 6dc2d7c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion netbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ def cli_arguments():
"""

parser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter)
parser.add_argument("-c", "--config-file", default="netbox.yml",
parser.add_argument("-c", "--config-file",
default=os.getenv("NETBOX_CONFIG_FILE", "netbox.yml"),
help="Path for configuration of the script.")
parser.add_argument("--list", help="Print all hosts with vars as Ansible dynamic inventory syntax.",
action="store_true")
Expand Down

0 comments on commit 6dc2d7c

Please sign in to comment.