k8s role grain
This commit is contained in:
13
_grains/role_k8s.py
Normal file
13
_grains/role_k8s.py
Normal file
@@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env python3
|
||||
import os.path
|
||||
|
||||
def _role_k8s():
|
||||
h = "unknown"
|
||||
if h == "unknown" and os.path.isfile("/usr/bin/kubeadm"):
|
||||
h = "k8s"
|
||||
return h
|
||||
|
||||
def main():
|
||||
grains = {}
|
||||
grains['role'] = _role_k8s()
|
||||
return grains
|
||||
Reference in New Issue
Block a user