added armbian and os_flavor grain

This commit is contained in:
do
2021-07-23 16:35:25 +02:00
parent f4c3467d65
commit a03211dff9
4 changed files with 26 additions and 0 deletions

16
_grains/os_flavor.py Normal file
View File

@@ -0,0 +1,16 @@
#!/usr/bin/env python3
import re
import os.path
def _os_flavor():
if os.path.isfile('/etc/armbian-release'):
h = "Armbian"
else:
h = "Debian"
return h
def main():
grains = {}
grains['os_flavor'] = _hardware()
return grains