• Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
  • Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login

CSV of hostnames to add to Group?

Scheduled Pinned Locked Moved Solved
FOG Problems
3
5
994
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U
    UWPVIOLATOR
    last edited by Jul 20, 2017, 3:00 PM

    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?

    1 Reply Last reply Reply Quote 0
    • T
      Tom Elliott
      last edited by Jul 20, 2017, 3:03 PM

      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.

      Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

      Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

      Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

      1 Reply Last reply Reply Quote 0
      • U
        UWPVIOLATOR
        last edited by Jul 20, 2017, 3:05 PM

        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?

        G 1 Reply Last reply Jul 20, 2017, 3:46 PM Reply Quote 0
        • G
          george1421 Moderator @UWPVIOLATOR
          last edited by george1421 Jul 20, 2017, 9:47 AM Jul 20, 2017, 3:46 PM

          @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

          Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

          U 1 Reply Last reply Jul 20, 2017, 4:33 PM Reply Quote 0
          • U
            UWPVIOLATOR @george1421
            last edited by Jul 20, 2017, 4:33 PM

            This post is deleted!
            1 Reply Last reply Reply Quote 0
            • 1 / 1
            1 / 1
            • First post
              4/5
              Last post

            187

            Online

            12.1k

            Users

            17.3k

            Topics

            155.4k

            Posts
            Copyright © 2012-2024 FOG Project