* Adds k8s.py
* Two module approach to support overlapping objects
* Clarify docs
* Clary state and force parameters
* Updates examples
* Add description and display_name
* Fix linting issues
* winrm: attempting to get kerb auth to work on MacOS
* moved to use pexpect if possible as it is simpler
* Made the pexpect event more lenient around different localisations
* Changed basic auth from NetworkCredential to Base64
* Added force_basic_auth parameter to win_get_url module
force_basic_auth provides user with option to control which mechanism to use
Updated win_get_url.py documentation section
* Add missing version_added in win_get_url.py
* minor update for documentation
Split the one monolithic test for basic.py into several files
* Split test_basic.py along categories.
This is preliminary to get a handle on things. Eventually we may want
to further split it so each file is only testing a single function.
* Cleanup unused imports from splitting test_basic.py
* Port atomic_move test to pytest.
Working on getting rid of need to maintain procenv
* Split a test of symbolic_mode_to_octal to follow unittest best practices
Each test should only invoke the function under test once
* Port test_argument_spec to pytest.
* Fix suboptions failure
Currently when we make up the return value, we take values based of the
parameters rather than the generated openssl_certificate itself.
This commits returns the actual certificate values making it all time
accurate.
https://docs.python.org/2/library/stdtypes.html#str.split
str.split([sep[, maxsplit]])
If sep is given, consecutive delimiters are not grouped together and are deemed
to delimit empty strings.
>>> "85563 ----------------C-- /var/lib/libvirt/images".split(' ')[0:2]
['85563', '']
>>> "85563 ----------------C-- /var/lib/libvirt/images".split()[0:2]
['85563', '----------------C--']
* Fixes a prompt doubling issue that impacted missing ios enable password prompts.
Due to get_prompt sending a '\n' the prompts became doubled and out-of-sync with what
was expected. This caused the enable command prompts to be missed.
Also added verification that on_become succeeded to reach enable prompt.
* Moved prompt doubling comment per shippable
This fix check for ESXi server instance before proceeding
with managing local user. Also, adds integration tests for
this change.
Fixes: #32465
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
* Add parent pid to persistent connection socket path hash
Fixes#33192
* Add parent pid in persistent connection socket path hash
to avoid using same socket path for multiple simultaneous
connection to same remote host.
* Ensure unique persistent socket path for each ansible-playbook run
* Fix CI failures
* Port ec2_vpc_net to boto3 and add support to expand existing VPCs
* Add s-hertel as an author for ec2_vpc_net
* Update ec2_vpc_net test for new error triggered by lack of credentials
Fix backwards compatibility
Document new return value
* Fix pep8 and return documentation
* Remove boto usage from boto3 modules
* Remove region checking
boto3_conn now takes care of region checking and handles NoRegionError
exceptions with a standard message
boto3_conn also takes care of other connection exceptions too.
* Document boto3 as a requirement for ec2_eni_facts
* Return id of ENI in addition to network_interface_id. To be compatible to ec2_eni.
* Added documentation for the return values of the ec2_eni_facts module
* Fix typo in docs for ec2_eni_facts
Provide Vault App role method to the lookup.
https://www.vaultproject.io/docs/auth/approle.html
Usage :
`{{ lookup('hashi_vault', 'secret=secret/hello:value auth_method=approle role_id=myroleid secret_id=mysecretid url=http://myvault:8200')}}`
You can skip `role_id` and `secret_id` if you set `VAULT_ROLE_ID` and `VAULT_SECRET_ID` environment variables.
* new package_facts module
Signed-off-by: Adam Miller <maxamillion@fedoraproject.org>
* remove package_facts pkg manager aliases, they are misleading
Signed-off-by: Adam Miller <maxamillion@fedoraproject.org>
* fix package_facts tests now that aliases are dropped
Signed-off-by: Adam Miller <maxamillion@fedoraproject.org>
* Initial commit for UcsConnection and ucs_macpool module.
Configures MAC address pools on UCS Manager.
* ansible-doc fixes
* PEP8 fixes
* pep8, pylint, and validate-modules fixes
* Correct indent issue introduced during pycodestyle cleanup
* Simplified module arugment setup.
Placed all code in main to avoid multiple calls and arg passing.
* module_utils/ucs changed to UCSModule which now handles login/logout directly
login_handle removed from module.params
doc updates on mac_list params and change to first_addr/last_addr for mac blocks
checking of all mac params
* Move module_utils to remote_management/ucs
Fix validate-modules issue with docs
* UCS MAC pool integration tests
Fixed issues with MAC pool descr and address range params
* Fixing aruba's inconsitent indenting.
* Adding config with different children indentation and unit test to confirm the different spacing does not matter.
* Fixing pylint check. Missed an r prefix.
* Added icinga2_host module
* Fix build error
* trailing spaces and other errors from ansible build process
* Formating
* docu errors
* last spacing; import module
* fix imports
* Removed request lib for ansible.module_utils.urls
* small whitespace fixes
* Remove typo
* Fix docu
* icinga2_hosts to icinga2_host in naming
* Update example
Fix Dewotine error when delete a none existing host
* Fixes docu problems
* White spaces
* small text improvements
* Remove force argument from module and docu
* Set author correct ( and hopefull the maintainer )
* Minor formatting changes
`os.environ['DO_API_TOKEN']` raised a `KeyError` preventing the check
for `os.environ['DO_API_KEY]` from being executed. Fix this by failing
only if the api token isn't set.
* When inserting a new rule in `insert_after_rule`, check if the old rule is
the last rule, to avoid a list index out of range error when attempting to
access the next rule.
* Add a test for inserting a new rule after the last rule.
* Bug Fixes to issues foubd during testing
* Removing blank line
* undefined-variable Undefined variable 'run_commands' and training new line
* Reverting and Modifying changes with both Unit test and Integrated test with Devices passing
Allow CamelCase version of snake_dict_to_camel_dict
(currently only dromedaryCase is supported)
Add reversible option to camel_dict_to_snake_dict
Add tests for both of these options
* Fix vyos on network_cli on python3
bytes do not have format() in Python3
* Push connection to tasks, with bonus connection=local test
* Run tests without explicit connection set
* Add/update START messages where appropriate
open(path) throws an error when called on a directory or UNIX socket,
and therefore a check to ensure that the path is absent will always
succeed when there is a directory or file located there.
This updates the check to use os.access(path, os.F_OK) instead, which
instead just checks that the path exists instead of trying to open it as
a file, and therefore properly handles directories and sockets.
This causes a slight semantic change in how permissions are handled.
The existing code will fail to work correctly if the user running the
module on the managed host has no read access to the path specified.
The new code will work correctly in that situation.
Both versions fail if the user can't traverse the parent directory.
I've also added a check to the try block to catch OSError. I've seen
this call fail with an OSError on rare occasion in the face of odd
extended permissions (usually MAC configuration) in cases where it
should technically return False. In such cases, the file is functionally
inaccessible to the user making the call, so it's essentially not there,
but it can't be created by them either. I've documented this, as well as
the fact that the bug this change fixes exists, and a rather nasty
inconsistency involving symbloic handling that I stumbled across while
testing this change.
Fixes: #20870
* vmware_host: add reconnect and add_or_reconnect states
Add "reconnect" and "add_or_reconnect" choices for "state".
* reconnect: reconnect an esxi to a vcenter (imply it is present).
* add_or_reconnect: do the same but add the esxi if absent.
Also:
* tag the cluster_name as required (because it is).
* tag esxi_username and esxi_password as not required because
they aren't when the esxi isn't added.
* vmware_host: add + prepare/document integration tests
vmware_host module
Add integration test for the add part of "add_or_reconnect" state.
Prepare and document integration tests for the reconnect part
of "add_or_reconnect" state and "reconnect" and "absent" states.
Currently we can't test those states as ReconnectHost_Task (for
"reconnect") and EnterMaintenanceMode_Task (for "absent") aren't
implemented yet in vcsim (from vmware/govmomi)
* Readded vital return parameters to the ec2_asg that have been spared for no obvious reason
* Fix typo in ec2_asg docs
* Fixing another typo in ec2_asg docs.
* Fixing save so it still works. Adding changed as an option for save_when.
* Updating unit tests.
* Updating description to state that changed was added in 2.5.
* Added new module: Azure RM SQL Servers
* fixed sanity issues
* enabled integration test
* disabling test as Microsoft.Sql namespace not available
* renamed servers -> server
* updates as requested in the review
* udpates to sql server
* renamed module
* replaced has_key by in
* flattened results
* final updates to sql server
* updates as requested in the review
* added more tests
* deleting unexisting instance up front
* more tests
* another round of test changes
* removed uneeded test
* Change cast_list_to_dict to more generic rekey_on_member
cast_list_to_dict was taking an arbitrary data format in and returning
an arbitrary data format out. Rework this to be a more generic function
which creates a dict of dicts based on a member of the dict.
Remove cast_dict_to_list since rekey_on_member handles the use cases we
know about and cast_dict_to_list suffers from the same problems as
cast_list_to_dict. If this is still needed we could think about filters
we could add to do this in a short jinja2 pipeline.
* Fix bare excepts (bare excepts even catch sys.exit())
Previously if a child's group vars section was defined before the
child group itself, an edge case would be hit where the state of the
pending declaration would process as var and therefore drop the
child pending declaration context. This would result in the group
vars defined for the parent group being out of scope for the child
group.
Example:
[web:children]
appnodes
proxies
[web:vars]
deployment_type=prod
[appnodes:vars]
foo_var=true
[appnodes]
appnodes[1:3].example.com
[proxies:vars]
bar_var=true
[proxies]
proxies[1:3].example.com
Previously the deployment_type variable would be out of scope for
both the appnodes and proxies groups. This patch fixes that.
Signed-off-by: Adam Miller <maxamillion@fedoraproject.org>
* allow multiple values per key in name fields in openssl_certificate
* check correct side of comparison
* trigger only on lists
* add subject parameter to openssl_csr
* fix key: value mapping not skipping None elements
* temporary fix for undefined "subject" field
* fix iteration over subject entries
* fix docs
* quote sample string
* allow csr with only subject defined
* fix integration test
* look up NIDs before comparing, add hidden _strict params
* deal with empty issuer/subject fields
* adapt integration tests
* also normalize output from pyopenssl
* fix issue with _sanitize_inputs
* don't convert empty lists
* workaround for pyopenssl limitations
* properly encode the input to the txt2nid function
* another to_bytes fix
* make subject, commonname and subjecAltName completely optional
* don't compare hashes of keys in openssl_csr integration tests
* add integration test for old API in openssl_csr
* compare keys directly in certificate and publickey integration tests
* fix typo
This fix adds following:
* Documentation update
* Add support for DHCP
* Refactor code to use PyVmomi class
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
* firewalld: Implement zone operations
Zones are removed or added when no other operations are used in
conjunction with the keywords 'present' or 'absent'.
This leads to a logical and natural syntax of:
- firewalld:
zone: foo
state: present
for adding or removing zones.
Signed-off-by: Felix Kaechele <felix@kaechele.ca>
* firewalld: zone ops: addressed review concerns
- Added more documentation on the peculiarities of the zone operations
- Output meaningful error messages when trying to use zones incorrectly
Signed-off-by: Felix Kaechele <felix@kaechele.ca>
* ACI Encap Pool: Add new module to support VLAN, VXLAN, and VSAN Pools
* update logic for allocation_mode
* update docstring and tests
* Update filter_target since url method has been updated
This fix removes a deprecated Postgresql User role attribute
called 'CREATEUSER' and 'NOCREATEUSER'. Also, updated documentation
for deprecation.
Fixes: #24928
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
On Fedora Atomic Host, there is no yum or dnf, but the module ot use to
install package should be atomic_container. We verify that this is
a Fedora Atomic Host with rpm-ostree, not atomic since atomic
can be used on a regular non ostree distribution.
* Fix _clean_result for debug callback with 1 char var names
The check in _clean_results was removing any keys that happened
to be one of the chars in ('invocation') instead of the string
'invocation'. This was meant to be a tuple but there was no comma
so the for iterated the string instead of the tuple.
Introduced in 9dba580204
Update unit test to catch this.
Fixes#33723
* Use .pop() to remove invocation from results dict
In base callback _clean_results, simplify the way the
'invocation' item is removed.
Add some more unit tests.
* Deprecate Entity, EntityCollection and use subspec in network modules
* As per proposal https://github.com/ansible/proposals/issues/76
deprecate use of Entity, EntityCollection, ComplexDict, ComplexList
and use subspec instead.
* Refactor ios modules
* Refactor eos modules
* Refactor vyos modules
* Refactor nxos modules
* Refactor iosxr modules
* Add support for key in suboptions handling
* Fix CI issues
* Refactor cloudscale API code
Move code common to all cloudscale cloud modules into a common base
class.
This is needed as a prepartion of the cloudscale_floating_ip module.
* cloudscale_floating_ip module
New cloud module to manage floating IPs on the cloudscale.ch IaaS
service.
* Update zabbix_host documentation (extend ipmi_-documentation, and update style to be consistent on the rest while we are at it)
* Remove ipmi_parameters being added to the API call when not required
* remove optional parameters from add_host, as well
Fix a bunch of things mentioned in the review.
Delete commented code from module. Add fix for vcsim not returning
uncommitted.
Add integration test.
Add changes suggested
* A first pass at moving libs to new dir structure
The network modules changed their module_utils dir structure.
This first patch establishes mod utils for F5 in this new structure.
Module use will be limited until things are more fleshed out
* Fixing upstream errors
* Fixing more issues
The command module docs were unclear. They talked about ignoring the user's environment which lead people to believe the user's environment variables were not used. In actual fact, the user's environment variables are used. They just are not expanded in the command.