26
26
from charmhelpers.core.hookenv import (
32
33
def create(sysctl_dict, sysctl_file):
33
34
"""Creates a sysctl.conf file from a YAML associative array
37
38
:param sysctl_file: path to the sysctl file to be saved
38
39
:type sysctl_file: str or unicode
43
49
with open(sysctl_file, "w") as fd:
45
51
fd.write("{}={}\n".format(key, value))
50
56
check_call(["sysctl", "-p", sysctl_file])