From 2420bca0b560d63401fd15452575298f51a35438 Mon Sep 17 00:00:00 2001 From: Alejandro Bednarik Date: Mon, 10 Jul 2017 04:09:29 -0300 Subject: [PATCH] Add GPl License header to rackhd inventory file. (#24354) --- contrib/inventory/rackhd.py | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/contrib/inventory/rackhd.py b/contrib/inventory/rackhd.py index 63e59dedcfc..536a38a83b9 100755 --- a/contrib/inventory/rackhd.py +++ b/contrib/inventory/rackhd.py @@ -1,10 +1,24 @@ #!/usr/bin/env python -import argparse +# This file is part of Ansible +# +# Ansible is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# Ansible is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Ansible. If not, see . + import json import os import requests -import types +import argparse RACKHD_URL = 'http://localhost:8080' @@ -51,6 +65,7 @@ def parse_args(): parser.add_argument('--list', action='store_true') return parser.parse_args() + try: # check if rackhd url(ie:10.1.1.45:8080) is specified in the environment RACKHD_URL = 'http://' + str(os.environ['RACKHD_URL'])