mirror of
https://github.com/ansible/awx.git
synced 2026-05-21 15:57:52 -02:30
Merge pull request #6242 from chrismeyersfsu/implement-6203
associate insights machine id w/ host on fact scan
This commit is contained in:
@@ -353,7 +353,7 @@ class Host(CommonModelNameNotUnique):
|
||||
|
||||
class Meta:
|
||||
app_label = 'main'
|
||||
unique_together = (("name", "inventory"),) # FIXME: Add ('instance_id', 'inventory') after migration.
|
||||
unique_together = (("name", "inventory"), ("insights_system_id", "inventory"),) # FIXME: Add ('instance_id', 'inventory') after migration.
|
||||
ordering = ('name',)
|
||||
|
||||
inventory = models.ForeignKey(
|
||||
@@ -414,6 +414,13 @@ class Host(CommonModelNameNotUnique):
|
||||
default={},
|
||||
help_text=_('Arbitrary JSON structure of most recent ansible_facts, per-host.'),
|
||||
)
|
||||
insights_system_id = models.TextField(
|
||||
blank=True,
|
||||
default=None,
|
||||
null=True,
|
||||
db_index=True,
|
||||
help_text=_('Red Hat Insights host unique identifier.'),
|
||||
)
|
||||
|
||||
objects = HostManager()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user