Skip to content

Commit

Permalink
Add option for host comment in bootstrap.py
Browse files Browse the repository at this point in the history
Add option --comment for bootstrap.py
  • Loading branch information
Fredrik Lindgren authored Jun 8, 2018
1 parent 42a24cd commit 3f777e2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -760,6 +760,8 @@ def create_host():
jsondata['host']['domain_id'] = mydomainid
if options.ip:
jsondata['host']['ip'] = options.ip
if options.comment:
jsondata['host']['comment'] = options.comment
myurl = "https://" + options.foreman_fqdn + ":" + API_PORT + "/api/v2/hosts/"
if options.force and host_id is not None:
disassociate_host(host_id)
Expand Down Expand Up @@ -1011,6 +1013,7 @@ def exec_service(service, command, failonerror=True):
parser.add_option("--install-packages", dest="install_packages", help="List of packages to be additionally installed - comma separated", metavar="installpackages")
parser.add_option("--new-capsule", dest="new_capsule", action="store_true", help="Switch the server to a new capsule for content and Puppet. Pass --server with the Capsule FQDN as well.")
parser.add_option("-t", "--timeout", dest="timeout", type="int", help="Timeout (in seconds) for API calls and subscription-manager registration. Defaults to %default", metavar="timeout", default=900)
parser.add_option("-c", "--comment", dest="comment", help="Add a host comment")
(options, args) = parser.parse_args()

if options.no_foreman:
Expand Down

0 comments on commit 3f777e2

Please sign in to comment.