added armbian and os_flavor grain
This commit is contained in:
16
_grains/os_flavor.py
Normal file
16
_grains/os_flavor.py
Normal 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
|
||||
4
os/armbian.sls
Normal file
4
os/armbian.sls
Normal file
@@ -0,0 +1,4 @@
|
||||
# remove this pesky thing,
|
||||
# we knwo what we are doing
|
||||
/etc/cron.d/armbian-updates:
|
||||
file.absent:
|
||||
5
os/init.sls
Normal file
5
os/init.sls
Normal file
@@ -0,0 +1,5 @@
|
||||
include:
|
||||
{% if grains['os_flavor'] == 'Armbian' %}
|
||||
- .armbian
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user