While trying to fix the test suite on python3, I noticed
this test fail due to to_json adding more whitespace in
python3 than in python2. So -w should ignored those
differences.
* Fix to_native call in selinux_context and selinux_default_context to
use the error handler correctly.
* Port set_mode_if_different to work on python3
* Port atomic_move to work on python3
* Fix check_password_prompt variable which wasn't renamed properly
* univention: add common code for univention corporate server modules
* univention: try import only univention specific libraries
* Code Review with @2-B, slight API changes and refactoring.
* Added module documentation overview, describing the provided functions
* Moved module-global objects into getter functions, so that we don't
need to import possibly-unavailable univention modules at the module level.
* Renamed some exports for improved consistency:
- module_name() -> module_by_name()
- orig_ldap -> ldap_module()
- ldap -> uldap()
Note that this introduces slight API changes from the outside. Instead of
directly accessing module properties, you now have module functions with the
same name. Examples:
- ansible.module_utils.univention.position_base_dn()
- ansible.module_utils.univention.config_registry()
- ansible.module_utils.univention.base_dn()
- ansible.module_utils.univention.config()
* module_utils univention: fix library
* move module_utils from univention to univention_umc, because python import univention fails if library is called univention
* univention_umc: fix intention
* univention: change common code to BSD-2-clause
* attempt #11 to role_include
* fixes from jimi-c
* do not override load_data, move all to load
* removed debugging
* implemented tasks_from parameter, must break cache
* fixed issue with cache and tasks_from
* make resolution of from_tasks prioritize literal
* avoid role dependency dedupe when include_role
* fixed role deps and handlers are now loaded
* simplified code, enabled k=v parsing
used example from jimi-c
* load role defaults for task when include_role
* fixed issue with from_Tasks overriding all subdirs
* corrected priority order of main candidates
* made tasks_from a more generic interface to roles
* fix block inheritance and handler order
* allow vars: clause into included role
* pull vars already processed vs from raw data
* fix from jimi-c blocks i broke
* added back append for dynamic includes
* only allow for basename in from parameter
* fix for docs when no default
* fixed notes
* added include_role to changelog
* Add OpenBSD virtualization facts.
Patch written by @jasperla.
Tested by various people on:
- virtualbox
- vmware esx(i) + fusion
- kvm (smartos + plain linux + a random cloud provider)
This patch is already present in the OpenBSD port of ansible.
* Rework diff to get rid of extra returns.
Requested by @bcoca.
While here, use four-space indentations of all code blocks.
* Set facts even if no match is found.
Discussed with @bcoca.
* Find sysctl via get_bin_path().
Requested by @bcoca.
* Fail if we do not find a sysctl binary.
* Do not fail if a sysctl binary is not found.
Just set empty fact values instead.
Requested by @bcoca.
There was general consensus that displaying every plugin load on -vvv
was *way* too noisy. This commit reformats the log message to be less
verbose, and drops it down to debugging-only level.
tempfile.NamedTemporaryFile keeps a file handle causing os.rename() to fail with windows based vboxfs: [Errno 26] Text file busy.
Changed NamedTemporaryFile to mkstemp() and added a finally block to unlink the temp file in each and every case.
AnsibleError is not imported in that file, and since that's
a parsing time issue, better raise AnsibleParserError like the
rest of the file.
Issue signaled on irc by gordon`
* run_command needed a bit of tweaking to its string handling of
arguments.
* The run_command change fixes the last bit of lineinfile so we can
enable its tests
This adds a new property to the Command object that is used to hold
modified command strings that could be different from the command used
to create the object. This allows for seamless switch between text and
json enabled commands.