CSV of hostnames to add to Group?
-
Server
- FOG Version: FOG Version: 1.4.4
- OS: S: Ubuntu 16.04
Client
- Service Version:
- OS:
Description
So I want to know if it’s possible to take a list of hostnames and add them to a group. We went through a laptop swap and we need to reimage the ones that were returned but I do not want to add 100 hosts to a group 1 by 1 just to assign image snapins and OU info. Is fog at a point that this can be done easier?
-
The API system.
PUT Request:
http://fogserver/fog/group
Body would contain:
{ "hosts": [1,2,3,4,5....] }
This should add the hostids to the group.
-
Thanks @Tom-Elliott now comes the real dumb question. How do you run that? Like what program do I use to run the API commands?
-
@UWPVIOLATOR You can make the call with curl or powershell. If you go the curl route, there is an executable for windows called curl.exe that will do need or you can call it from a linux command prompt.
@Wayne-Workman has some very fine examples of curl calls in this thread: https://forums.fogproject.org/topic/9779/can-i-use-some-kind-of-script-to-create-image-and-ghost-my-lab-machines
-
This post is deleted!