Skip to content

Commit

Permalink
Set virtual grain on EC2 instances
Browse files Browse the repository at this point in the history
  • Loading branch information
amendlik authored and Megan Wilhite committed Mar 18, 2022
1 parent aca06e4 commit 17d10f6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions salt/grains/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1117,6 +1117,8 @@ def _virtual(osdata):
grains["virtual"] = "OpenStack"
if maker.startswith("Bochs"):
grains["virtual"] = "kvm"
if maker.startswith("Amazon EC2"):
grains["virtual"] = "Nitro"
if sysctl:
hv_vendor = __salt__["cmd.run"]("{} -n hw.hv_vendor".format(sysctl))
model = __salt__["cmd.run"]("{} -n hw.model".format(sysctl))
Expand Down

0 comments on commit 17d10f6

Please sign in to comment.