Add option to enable the sysctl -e option
Reworked PR to avoid repeating the command
Fix inventory for test_dir_inventory

It came up that fixing this unit test may relate to another ticket that is open. This work allows us to uncomment this unit test by fixing how we pars variables allowing a quoted variable to contain a '#'.

Work also went into cleaning up some of the test data to clarify what was working.

Lastly work went into cleaning up formatting so that the code is easily read.
Break this out into a reusable function and document regex shortcomings.
Merge pull request #5872 from tomdymond/add-ignoreerror-to-sysctl

Add option to enable the sysctl -e option
add test same host in different files in dir

tests issue #5749
 same host defined in different groups which in turn are defined
 in different ini files in an inventory directory

Conflicts:
	test/units/TestInventory.py
modifed test to use get_hosts instead of get_groups

closes #5749

Conflicts:
	test/units/TestInventory.py
Minor cleanup.
Fixes #6298 and adds a sudo unit test for synchronize
Merge pull request #6287 from risaacson/fix_hash_in_var

Fix inventory for test_dir_inventory, merge PRs from GH-5749, cleanup some formatting.
Micro-optimization of inventory.expand_hosts.detect_range
Micro-optimization: replace s.find(x)!=-1 with x in s

timeit shows a speedup of ~3x on Python 2.7.5 x86_64.
It also makes the code a bit shorter.
hostname module: don't filter hostnamectl with awk

There's no need to filter hostnamectl's output with awk because its man
page says:

    hostnamectl [OPTIONS...] {COMMAND}

       --static, --transient, --pretty
	   If status is used (or no explicit command is given) and one
	   of those fields is given, hostnamectl will print out just
           this selected hostname.

E.g. hostnamectl --static status => ansible.example.org