##### SUMMARY

```
master:/usr/local/lib/python2.7/site-packages/ansible/modules/system/sysctl.py", line 297, in reload_sysctl
UnboundLocalError: local variable 'err' referenced before assignment
```

- Bug exists in Ansible 2.7.11 and the latest git repo
- Related source file: https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/system/sysctl.py#L278

##### ISSUE TYPE
- Bug Report

##### COMPONENT NAME

- sysctl

##### ANSIBLE VERSION
```paste below
$ ansible --version
ansible 2.7.11
  config file = /Users/zhb/projects/pro/ansible.cfg
  configured module search path = [u'/Users/zhb/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python2.7/site-packages/ansible
  executable location = /usr/local/bin/ansible
  python version = 2.7.16 (default, May 24 2019, 09:49:36) [GCC 4.2.1 Compatible Apple LLVM 10.0.1 (clang-1001.0.46.4)]
```

##### OS / ENVIRONMENT

- Host OS: macOS 10.14.5
- Target OS: OpenBSD 6.5 (amd64)
name: kernel.panic
    state: absent
    sysctl_file: /etc/sysctl.conf
# Set kernel.panic to 3 in /tmp/test_sysctl.conf
- sysctl:
    name: kernel.panic
    value: '3'
    sysctl_file: /tmp/test_sysctl.conf
    reload: no
# Set ip forwarding on in /proc and verify token value with the sysctl command
- sysctl:
    name: net.ipv4.ip_forward
    value: '1'
    sysctl_set: yes
# Set ip forwarding on in /proc and in the sysctl file and reload if necessary
- sysctl:
    name: net.ipv4.ip_forward
    value: '1'
    sysctl_set: yes
    state: present
    reload: yes
'''
import os
import re
import tempfile
from ansible.module_utils.basic import get_platform, AnsibleModule
from ansible.module_utils.six import string_types
from ansible.module_utils.parsing.convert_bool import BOOLEANS_FALSE, BOOLEANS_TRUE
from ansible.module_utils._text import to_native
class SysctlModule(object):