def set_overcommit_memory(_host, _value): env.host_string = _host sudo('sysctl vm.overcommit_memory={}'.format(_value)) run('echo "vm.overcommit_memory = {}" | sudo tee -a /etc/sysctl.conf'.format(_value))