Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 06-12-2020, 11:04 AM   #1
Registered: May 2019
Posts: 48

Rep: Reputation: Disabled
Spacewalk/Satellite command to check if host already exists? API?

I have a script to add newly created VMs to spacewalk and satellite. However, it doesn't check for duplicates and it happens every so often. I want to check first if the hostname already exists and exit before adding. Is there a command to do that or do I need to use the API?
Old 06-30-2020, 05:53 PM   #2
Registered: Dec 2007
Distribution: Fedora, Oracle Linux & Centos
Posts: 197

Rep: Reputation: 26
I use to run the "spacewalk-report" with the "inventory" option to dump the inventory to a file, then parse for the hostname. It's been awhile but I'm pretty sure I made a script which; I'd provide an argument for the new hostname I wanted to make sure wasn't already in said inventory.


centos7, linux, rhel7, satellite, spacewalk

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Ruby - Need to select individual properties from objects in spacewalk api Thaidog Programming 3 08-14-2015 09:14 AM
openstack-nova-{compute,network,api,metadata-api} as it says pid file exists but dead Bhargavnagaraju Linux - Newbie 0 05-28-2015 05:47 PM
Spacewalk 2.2 setup-spacewalk errors: cannot add tomcat user to apache group Thaidog Linux - Server 3 01-19-2015 12:44 AM
satellite internet + VoIP or satellite internet + satellite phone rblampain Linux - Networking 2 08-27-2010 08:05 AM
API to check IP address exists in Network ashok449 Linux - Networking 3 05-12-2010 10:13 AM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:50 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration