FOG Project

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

    Add Snapin to all hosts by OS

    FOG Problems
    2
    8
    1667
    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.
    • apathetic_admin
      apathetic_admin last edited by

      I’m trying to come up with a mysql query that would do this, but I’m outside my comfort zone for sure. I have a snapin that I need to deploy to all hosts that have XP for their OS. I was originally going to create a group of XP machines, but I couldn’t group them by OS. I have a list of hostIDs of machines that are XP, but I’m not sure how to go about creating the mysql query to do this.

      1 Reply Last reply Reply Quote 0
      • apathetic_admin
        apathetic_admin last edited by

        INSERT INTO snapinAssoc (saHostID,saSnapinID) SELECT hostID,122 FROM hosts WHERE hostOS=‘1’

        This will only work on FOG <1.0, but here it is, in case anybody is searching the forum for something similar. In this case, my saSnapinID is 122, and we were looking for all hosts with a hostOS of 1 (which was XP).

        Thanks to Tom for all of his help!

        1 Reply Last reply Reply Quote 0
        • Tom Elliott
          Tom Elliott last edited by

          Well,

          Can you contact me on Convo?

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

            I think I’ll just write my snapin to query the Windows version, and I can apply it to all for now. Hopefully this won’t be an issue too much longer if we can get rid of our XP machines, otherwise once we update to the latest and greatest FOG version I can group and associate by image as you suggested before.

            1 Reply Last reply Reply Quote 0
            • apathetic_admin
              apathetic_admin last edited by

              [quote=“Tom Elliott, post: 45168, member: 7271”]Did 0.32 have a search feature to search by the OS?[/quote]
              No 😞

              1 Reply Last reply Reply Quote 0
              • Tom Elliott
                Tom Elliott last edited by

                Did 0.32 have a search feature to search by the OS?

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

                  Unfortunately there are 500 or so hosts that are still using XP. I should have mentioned before, I’m still on .32 , so the OS association is still by host I think.

                  1 Reply Last reply Reply Quote 0
                  • Tom Elliott
                    Tom Elliott last edited by

                    This is actually really difficult to implement. Especially since the OS is now changed over to be a part of the image vs. associated to the host.

                    It’s fairly simple at the same time and shouldn’t require an sql request.

                    If you know the hosts that are of a particular image (or set of images that are of the OS you want) just create a group with those hosts in it. Go to Snapins from the newly created group and add the snapins you want associated to the hosts within that 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
                    • 1 / 1
                    • First post
                      Last post

                    237
                    Online

                    10.2k
                    Users

                    16.3k
                    Topics

                    149.9k
                    Posts

                    Copyright © 2012-2020 FOG Project