Currently get_result() can only handle a dict. When requiring facts, and
when there is more than one fact, get_result() should be able to handle
a list of dicts, so the normalization process happens to all the items.
* Update yum_repository.py
Having spent some time trying and googling how to enable an installed repo with this, I discovered that the thread at https://github.com/ansible/ansible-modules-extras/issues/2384 had decided that this would not be supported and recommended use of ini_file instead. Since I am sure I'm not alone in expecting yum-repository to support enabling/disabling a configured repo, I suggest adding a note so people find this easier.
This fix adds additional check for getting template from
virtual machine before using it.
Fixes: #42011
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
* Do not compare result to unset parameter in sysvinit module
* Fix misformed command in sysvinit module
* Small None-comparison style fix in sysvinit module
* fix a (forgotten?) change in moving createhome -> create_home
Fix for following bug on FreeBSD host whith user module:
```
fatal: [webssp]: FAILED! => {"changed": false, "module_stderr": "X11 forwarding request failed
Traceback (most recent call last):
File \"/tmp/ansible_2rmlBl/ansible_module_user.py\", line 2487, in <module>
main()\n File \"/tmp/ansible_2rmlBl/ansible_module_user.py\", line 2426, in main
(rc, out, err) = user.modify_user()
File \"/tmp/ansible_2rmlBl/ansible_module_user.py\", line 1011, in modify_user
if (info[5] != self.home and self.move_home) or (not os.path.exists(self.home) and self.createhome):
AttributeError: 'FreeBsdUser' object has no attribute 'createhome'
", "module_stdout": "", "msg": "MODULE FAILURE", "rc": 1}
```
It happenned with 'createhome' AND with 'create_home' form, with python 2.7 AND python 3.6
* Add changelog
Co-authored-by: dgeo <dgeo@users.noreply.github.com>
If user exports https_proxy without scheme, then generic_urlparse
fails to parse SCHEME and HOSTNAME from https_proxy variable.
This fix raises ProxyError is generic_urlparse API fails to parse
either of them.
Fixes: #25421
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
* Make the code more PowerShell compliant
* Correction of the mistaken comment
* Revert style changes to If/Else/Elseif
* Remove an ignored PSScriptAnalyzer rule due to the code correction
* Decreasing of an entropy ;-) and replacing the next to aliases
* minor whitespace changes
* First pass at making 'private' work on include_role, imports are always public
* Prevent dupe task execution and overwriting handlers
* New functionality will use public instead of deprecated private
* Add tests for public exposure
* Validate vars before import/include to ensure they don't expose too early
* Add porting guide docs about public argument and change to import_role
* Add additional docs about public and vars exposure to module docs
* Insert role handlers at parse time, exposing them globally
* construct_path() now supports custom keys
- Allows for much more flexible test substitution
- Implemented functionality in meraki_vlan for test case
* Fix comments for PEP8
* use get_option instead of directly internal dict
as get_option can populate it, while direct access cannot
also setup fallback values for derived plugins not using config system correctly
now can use `ansible-test units module_name` for the aws_s3 and aws_api_gateway modules
changes to modules/cloud/amazon/aws_api_gateway and modules/cloud/amazon/aws_s3 are not triggering the unit tests; also fix aws_s3 from importing non-exist module and skipping tests
changes to module_utils/aws/core.py are only being unit tested on modules that import from the file (if they have a corresponding test) or tests that import from the file themselves.
The given example causes the pip module to fail. If the umask is given as an octal string without quotation marks, the pip module converts it into an integer (i.e., an invalid umask).
+label: docsite_pr
* add submode features ipv4/ipv6
* add tests for submode
* the parameters both_ * were not idempotent, in what is read in the configuration we have a list with 2 entries (import, export) while the input parameter has only one parameter which will be applied twice
* add docstring to the ios_vrf module + provide a fix for: https://github.com/ansible/ansible/issues/41581
* complete tests
* add missing description
* fix KeyError for address-family ipv*
* fix both_* tests
* fix E231, W292, W293
* fix W293
* remove set has it doesn't preserve order of routes
* fix E106
* remove ImportError: cannot import name OrderedDict
* We should be able to mix the parameters for the routes targets , while remaining imdepotent. During the first implementation we did not take this into account, which did not correspond to the reality of the needs in production (to be able to use each parameter indifemently together)
* remove epdb reference
* FIX E111, E106
* FIX E302
* using loop produce a result who was not imdepotent
* FIX E241
* fix: used pass intead of list