• 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
    973
    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.
    • UWPVIOLATORU
      UWPVIOLATOR
      last edited by

      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
      • Tom ElliottT
        Tom Elliott
        last edited by

        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
        • UWPVIOLATORU
          UWPVIOLATOR
          last edited by

          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?

          george1421G 1 Reply Last reply Reply Quote 0
          • george1421G
            george1421 Moderator @UWPVIOLATOR
            last edited by george1421

            @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!

            UWPVIOLATORU 1 Reply Last reply Reply Quote 0
            • UWPVIOLATORU
              UWPVIOLATOR @george1421
              last edited by

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

              141

              Online

              12.1k

              Users

              17.3k

              Topics

              155.3k

              Posts
              Copyright © 2012-2024 FOG Project