mirror of
https://github.com/ansible/awx.git
synced 2026-05-08 09:57:35 -02:30
associate insights machine id w/ host on fact scan
* Add inisghts fact scan module * Update fact scan playbook to call new insight fact scan module * JT run w/ store_facts=True will save scanned facts. We "skim" the machine_id fact from Insights fact scans and associate it with the host that the fact scan came from.
This commit is contained in:
@@ -350,7 +350,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_machine_id", "inventory"),) # FIXME: Add ('instance_id', 'inventory') after migration.
|
||||
ordering = ('name',)
|
||||
|
||||
inventory = models.ForeignKey(
|
||||
@@ -411,6 +411,13 @@ class Host(CommonModelNameNotUnique):
|
||||
default={},
|
||||
help_text=_('Arbitrary JSON structure of most recent ansible_facts, per-host.'),
|
||||
)
|
||||
insights_machine_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