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