This allows meta refresh_inventory to work with relative paths
Added option to unfrackpath to not resolv symlinks
fixes#16857
(cherry picked from commit 8217c1c39c)
* Fix unbound method call for JSONEncoder
The way it is currently it will lead to unbound method error
```python
In [1]: import json
In [2]: json.JSONEncoder.default('object_here')
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-2-872fdacfda50> in <module>()
----> 1 json.JSONEncoder.default('object_here')
TypeError: unbound method default() must be called with JSONEncoder instance as first argument (got str instance instead)
```
But what is really wanted is to let the json module to raise the "is not serializable error" which demands a bounded instance of `JSONEncoder()`
```python
In [3]: json.JSONEncoder().default('object_here')
---------------------------------------------------------------------------
TypeError: 'object_here' is not JSON serializable
```
BTW: I think it would try to call `.to_json` of object before raising as it is a common pattern.
* Calling JSONEncoder bounded `default` method using super()
(cherry picked from commit b06fb2022c)
Searching the DEFAULT_ROLES_PATH and the roles basedir should come
before this, and it has been a long standing oversight.
Fixes#17882
(cherry picked from commit 0a86ddc251)
* Add tests for the mount module
* Switch from unmounted to absent...
the code for mounting always modifies fstab so we need to always modify
fstab to cleanup as well.
* Fix comments and copyright
6eefc11c converted task.loop_control into an object, but while the other
callers were updated to use .loop_var instead of .get('loop_var'), this
site was overlooked.
This can be reproduced by including with loop_control a file that does
set_fact; a simple regression test along these lines is included.
(cherry picked from commit 950cc26aab)
The cherry-pick allows module parameters to convert int to float, fixing
bugs where a float type is required. However, it used types from the
six library for python3 compatibility as well. Since we don't have
six in 2.1.0 this was buggy. Merging the unittests for the problem
here: adc158a499 made this buggy behaviour
apparent.