This library is a backport (to 2.x versions of Python) of the code
that is found in the mainline versions of Python 3.x. It is being
included so that networking vendors, and others, can make use of it
without needing to add a python module dependency to their own modules.
A separate dependency would add to user burden of satisfying those
dependencies before using some Ansible modules.
In a previous core meeting, this was approved. Naming of the directory
it is found in was up for debate, but "compat" was the first directory
to have some sort of concensus.
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
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
This change adds a new argument to the telnet action plugin that will
cause the module to send a newline character before trying to login.
This is convienent when using telnet over a console connection that
needs an initial newline character to start the login process.
This change also will cause the sent command and command response to be
displayed on stdout when running in verbose mode (5 v's).
* Added Scaleway volume module.
* Fixed imports order.
* Fixed version added.
* Improved sanity checks.
* Fixing style formatting.
* Added new line at the end of file. Fixed typo in comment.
If parameter scope is not set (is None) the usual handling of lists does
not apply, and should be avoided or we get an exception.
This needs to be backported to earlier versions of Ansible.