Commit graph

20012 commits

Author SHA1 Message Date
Abby Howe
2479b6d635 added force option to zabbix_hostmacro to allow control of overwriting (#35516)
* added force option to hostmacro to allow control of overwriting existing macro

* wording changes as suggested by eikef in PR 35516

* further wording changes from eikef

* added 'version_added: 2.5' to the documenation for the force option
2018-02-01 03:37:11 -05:00
Dag Wieers
12b8b8dcf2
aci_aaa_user: Manage AAA users on ACI fabrics (#35543)
* aci_aaa_user: Manage AAA users on ACI fabrics

* Fix module documentation

* Ensure we allow to not set accountStatus and expires

* Added aaa_password_lifetime and aaa_password_update_required support

* Improvements to integration tests in light of issue 35544

* Fix ACI ISO 8601 formatted string

* Add HAS_DATEUTIL
2018-02-01 00:45:32 +01:00
Bryan Gurney
3b30297817 New Ansible module for Virtual Data Optimizer (#32267)
Add an Ansible module for VDO (Virtual Data Optimizer), a
device-mapper module that provides deduplication, compression,
and thin provisioning.  This module provides the ability to create,
remove, and modify parameters on storage volumes created by VDO.
2018-01-31 15:22:01 -05:00
Sloane Hertel
556bb7ab00 [cloud] Log more exception info to fix sts_assume_role integration tests (#35570) 2018-01-31 13:18:09 -05:00
Anil Kumar Muraleedharan
a6d9bccd6f Changing ENOS cliconf plugin license from BSD to GPL (#34889)
* Changing BSD to GPL
2018-01-31 11:18:24 -05:00
Eric Brown
9c2c2f1534 ios_facts: consistently use type of string not str (#35104)
The return documentation for ios_facts used an inconsistent mix
of str and string to denote a string data type.

This patch modifies all to be "string".
2018-01-31 09:28:38 -05:00
kiorky
9001a8794f FIX: multiple nested tasks include levels (#35165)
* Test for include_tasks & include_role bug

Related to ansible/ansible:#21890

* Fix nested include_tasks called from role

This fixes the path of included files when you want
to call include_task inside a role's task file and this
role is itself called from multiple level of playbook include_tasks

Related to ansible/ansible:#21890
This fixes ansible/ansible:#35109
2018-01-31 07:35:06 -06:00
Eike Frost
984edacd2a New module: keycloak_clienttemplate (#33419)
* keycloak_clienttemplate

* BOTMETA maintainership for identity/keycloak namespace

* fix superfluous blank line

* catch ValueError when trying to decode JSON

* further documentation for protocol mappers and some checks

* whitespace fixes, YAML fixes

* remove state: dump, update argument_spec and documentation with suboptions

* add documentation for realm option

* document aliases for auth_keycloak_url, auth_username, and auth_password (i.e. url, username, and password)

* remove bearer_only, consent_required, standard_flow_enabled, implicit_flow_enabled, direct_access_grants_enabled, service_accounts_enabled, public_client, and frontchannel_logout from module options.
2018-01-31 13:12:53 +00:00
Ganesh Nalawade
9aadd8704a
Handle multiple sub prompts for network_cli connection (#35361)
* Handle multiple sub prompts for network_cli connection

Fixes #35349

*  Check if the same prompt is repeated in consecutive window
   if it is repeated it indicates there is problem with answer
   provided
*  In that case report error to user

* Fix CI failure

* Fixes #35349

*  Add prompt_retry count to control max number of times
   to expect the same prompt before it error's out

*  Make required changes in ios and eos terminal plugin to handle
   wrong enable password correctly and return proper error
   message to user.

*  Check if the same prompt is repeated in consecutive window
   if it is repeated it indicates there is the problem with an answer
   provided

*  In that case report error to user
2018-01-31 18:33:23 +05:30
Katerina Koukiou
19ac188e86 ovirt_storage_domains: docs: override_luns parameter is applicable also to fcp (#35506) 2018-01-31 07:47:37 -05:00
Ondra Machacek
f4c68868ee ovirt_auth: Fix checking of auth paramters (#35512) 2018-01-31 07:47:25 -05:00
Anil Kumar Muraleedharan
766f7c0577 Fixing Bug for Embedded Switches in Parsing data (#35541) 2018-01-31 12:05:43 +00:00
Anil Kumar Muraleedharan
4e7e7042cc Changing order of load and loadfp (#34793)
* Changing order of load and loadfp

* Removing exception as per Ganesh Review comments
2018-01-31 14:04:43 +05:30
Felix Fontein
2c482847ce letsencrypt: fix account key detection for keys created by openssl_privatekey (#35534)
* Fixing key detection if key was generated with openssl_privatekey.

* Fixing error formatting.
2018-01-31 02:24:08 -05:00
Ganesh Nalawade
311918828f
Fix double prompt issue in network_cli (#35439)
Fixes #33993

In current implementation while trying to fetch the
current cli prompt terminal plugin executes `\r` on remote host.

This causes if command execution results in a prompt for
example executing `enable` command results in `Password:` prompt
there by executing `\r` on password prompt which is not intended.

To fix it while fetching current prompt from terminal plugin use `get_prompt()`
api in network_cli that returns the latest matched prompt instead of
unnecessary executing `\r` on remote host.
2018-01-31 11:43:08 +05:30
saichint
dc35baa8db fix nxos_pim_interface issues (#35405)
* fix nxos_pim_interface issues

* add absent test for pim_interface
2018-01-31 10:51:11 +05:30
Shinichi TAMURA
fec85a42a6 timezone module: Enhanced update command for Debian/Ubuntu (#34390)
* timezone module: Symlink to /etc/localtime before dpkg-reconfigure in Debian/Ubuntu

* timezone module: Symlink rather than hard link
2018-01-30 18:34:45 -05:00
Colins-Git
ac7e62ec08 open_iscsi fails to login when discovery returns multiple portals #29309 (#35262) 2018-01-31 00:03:35 +01:00
Chris St. Pierre
c24e092865 Add jenkins_job_facts module (#35346)
* Add jenkins_job_facts module

* Fix docs

* Fix connection error handling

* Add support for filtering by color

* Miscellaneous code cleanup

* Spell out "underscore" in comment

* Update required state in docs
2018-01-30 23:42:33 +01:00
Felix Fontein
2ebb611b50 Changing letsencrypt module to use ACME v2 protocol (update) (#35283)
* Adding warnings.

* Forgot choices for acme_version in code.

* Removed 'errors' support again.

* For DNS challenges, also return complete record to simplify wildcard generation (see #35283).

* Also returning order URI and account URI. This is mainly for debugging purposes.

* Adding more clear separation between the two calls. Avoids problems where code during second call thinks it is during first call and doesn't stop with error, but doesn't obtain a new certificate either.

* Added validate_certs parameter.

* Actively discouraging from setting validate_certs to false.

* Fixing DNS challenge example.

* Adding new output challenge_data_dns, which simplifies DNS challenges.
2018-01-30 17:39:58 -05:00
Ryan S. Brown
05f765bda0 New module: aws_batch_job_definition 2018-01-30 17:28:45 -05:00
Jonathan Meran
8578b3c1c5 [cloud] new module aws_batch_job_queue: support for AWS Batch Job Queues (#26701)
1. Removed redundant default values in argument_spec
2. Enclosed non standard python libraries in Try Except ImportError block
3. Added region as a mandatory element in argument_spec
4. Updated the typo in api_params while accessing job queue. Changed it from job_queue to jobQueue
5. Updated the set_api_params() method to use snake_dict_to_camel_dict()
6. Updated the ANSIBLE_METADATA version from 1.0 to 1.1
7. Updated the version_added in Documentation from 2.4 to 2.5
8. Initialized response value to None
9. Updated the RETUN documentation
10. Updated the return from manage_state() method to not embed batch_job_queue_action in ansible_facts
11. Updated the module.exit_json()  in main() to convert any keys back to snake_dict format using camel_dict_to_snake_dict to maintain consistency throughout the module
12. Changed the filename from batch_job_queue.py to aws_batch_job_queue.py
2018-01-30 17:22:06 -05:00
Clement Trebuchet
287f3a609e Fixes #35468: ADD max_results to the nios api (#35473)
* Fixes #35468: ADD max_results to the nios api

* Fixes #35468: fix nios unittest

* Fixes #35468: document the module docs fragments for nios
2018-01-30 22:21:45 +00:00
Matt Martz
c282e4e00f
Replace LooseVersion comparison with int/float comparison. Fixes #35435 (#35519) 2018-01-30 15:27:22 -06:00
Sloane Hertel
fda09a75d3 elasticache: default zone to None - fixes #31779 (#31785)
* elasticache: default zone to None.

* Only add PreferredAvailabilityZone to kwargs if self.zone is not None
2018-01-30 16:12:22 -05:00
Sloane Hertel
2c4f52d404 [cloud] iam_role: allow retention of existing policies (#28513)
* module_iam_role: add_remove_policies_option

* Update 24080 with requested changes.

* Fix whitespace and rename the option remove_unlisted_policies to purge_policies.

Update version_added

* Fix exception handling in iam_role module

* Fix line length
2018-01-30 15:13:45 -05:00
Harri Tuominen
234a877ea5 Netact cm command2 (#34873) 2018-01-30 19:00:29 +00:00
Matt Martz
f659cc5963
Guard against assignments that are not ast.Name in docs parsing (#35513) 2018-01-30 12:56:16 -06:00
Jonathan Meran
9e68ac9d86 Initial support for AWS Batch Compute Environment (#26699)
* Add AWS Batch Compute Environment module

* Move common code for AWS batch modules in module_utils/aws/batch
2018-01-30 13:24:38 -05:00
Peter Sprygada
58d54799b8
exposes rpc method to plugin (#35507)
The rpc method should be exposed to the modules over the connection rpc
mechanism.  This fix will expose the rpc method to call generalized rpc
endpoints on remote devices
2018-01-30 12:27:48 -05:00
Adrian Likins
bf5770dec4
Fix virt role detection for kvm if no other match (#35403)
This fixes an indention bug introduced in
45a9f96774
that was causing the virtualization_role to be set to 'host'
for many cases incorrectly.

Fixes https://github.com/ansible/ansible/pull/21621
(the issue mentioned in the pr)
2018-01-30 11:42:13 -05:00
Adam Miller
6cc5e4c9df
galaxy remove incorrect check for role path before extraction (#35259)
* galaxy remove incorrect check for role path before extraction

Fixes #35217

Currently lib/ansible/galaxy/role.py checks roles_path and will
ignore paths that don't currently exist which it should not because
the path will attempt to be created by the role extraction process
(which is valid and expected behavior) and if unable to write at the
time of role extraction into the role_path, that error will be
handled properly at that point in the process.

Signed-off-by: Adam Miller <admiller@redhat.com>

* add test case for galaxy install with rolefile and rolepath

Verify we don't regress GitHub Issue #35217

Signed-off-by: Adam Miller <admiller@redhat.com>

* fix the integration test

Signed-off-by: Adam Miller <admiller@redhat.com>

* double quote for shellcheck glob warning

Signed-off-by: Adam Miller <admiller@redhat.com>

* fix galaxy install tests to not need remote resources

Signed-off-by: Adam Miller <admiller@redhat.com>

* make shellcheck sanity tests happy

Signed-off-by: Adam Miller <admiller@redhat.com>

* prep git global conf for running the galaxy install tests in docker

Signed-off-by: Adam Miller <admiller@redhat.com>

* move ansible-galaxy tests into their own target, make git conf non-global

Signed-off-by: Adam Miller <admiller@redhat.com>

* fix up tests based on feedback

Signed-off-by: Adam Miller <admiller@redhat.com>

* remove extra newline from aliases file

Signed-off-by: Adam Miller <admiller@redhat.com>
2018-01-30 10:40:25 -06:00
Nathaniel Case
4a79112e5c
Fix ios_facts return values (#35239)
* Revert model and serialnum to older version

* Add stacked versions of model and serialnum as separate facts

* Add unit test to check stacked output

* Alter model regex to address #34768
2018-01-30 11:17:14 -05:00
David Soper
f5022de5d6 Add support for primary and secondary redundancy types. Require cdn name for user-defined names. (#35505) 2018-01-30 16:50:16 +01:00
Toshio Kuratomi
3d614bfe84 Clarify lookup plugin TypeError recovery
Change the code and comments around recovering from a TypeError in
handling the return value from lookup plugins to make it clearer what
we're recovering from.
2018-01-30 07:21:36 -08:00
John R Barker
a23c95023b
Module deprecation: docs, scheme and tests (#34100)
Enforce module deprecation.
After module has reached the end of it's deprecation cycle we will replace it with a docs stub.

* Replace deprecated modules with docs-only sub
* Use of deprecated past deprecation cycle gives meaningful message (see examples below)
* Enforce documentation.deprecation dict via `schema.py`
* Update `ansible-doc` and web docs to display documentation.deprecation
* Document that structure in `dev_guide`
* Ensure that all modules starting with `_` have a `deprecation:` block
* Ensure `deprecation:` block is only used on modules that start with `_`
* `removed_in` A string which represents when this module needs **deleting**
* CHANGELOG.md and porting_guide_2.5.rst list removed modules as well as alternatives
* CHANGELOG.md links to porting guide index

To ensure that meaningful messages are given to the user if they try to use a module at the end of it's deprecation cycle we enforce the module to contain:
```python
if __name__ == '__main__':
    removed_module()
```
2018-01-30 12:23:52 +00:00
Martin Krizek
7c83f006c0
Fix triggering parent's always with run_once set (#35464) 2018-01-30 13:16:19 +01:00
Chip Gwyn
2293252e52 bug-35431 fixed removing encryption from user on subsequent runs of the task (#35433) 2018-01-30 11:26:54 +05:30
Peter Sprygada
2f7d207d7a
fixes error in dict_merge when merging list value (#35461) 2018-01-29 21:45:35 -05:00
Stephen Granger
7fa09390b0 Elasticbeanstalk app (#31079)
* New AWS elasticbeanstalk app module

* Integration tests for elasticbeanstalk_app
2018-01-29 18:38:32 -05:00
Abhijeet Kasurde
becb31f34c nmcli: Allow setting ipv4.dhcp-client-id parameter (#34268)
Signed-off-by: Orion Poplawski <orion@cora.nwra.com>
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-01-29 17:02:46 -06:00
Sloane Hertel
6dda001a8c [cloud] new module - AWS Direct Connect virtual interface (#33211)
* Add an AWS Direct Connect virtual interface module

Fix DirectConnectError exception wrapper to be compatible with fail_json_aws()

* Fix documentation and handle BotoCoreErrors as well

* Add the aws and ec2 documentation fragments
2018-01-29 17:23:03 -05:00
Matt Clay
e98e757ec4 Fix win_regedit module and tests. (#35478) 2018-01-30 07:57:03 +10:00
Sloane Hertel
fed4217fd7 [cloud] ec2_eni: Add a purge option for secondary ip addresses - fixes #26575 (#26596)
* add purge option for secondary ip addresses and fix changed to reflect when addresses are modified

* Improve option documentation and make the secondary_private_ip_addresses option required if purging secondary private ip addresses.

* ec2_eni: update version_added to 2.5 for purge_secondary_private_ip_addresses option.
2018-01-29 16:31:21 -05:00
John R Barker
923174a856
Infoblox should be run locally (#35390)
* Infoblox should be run locally

* use connection: local
2018-01-29 20:38:36 +00:00
Ed Costello
d16bc1c3f4 New aws_ses_identity module to manage AWS Simple Email Service Identity (#31140)
* Add aws_ses_identity module

* Update CI alias, add BotoCoreError exception handling.

* Add SES and SNS permissions to hacking/aws_config to run aws_ses_identity integration tests
2018-01-29 15:35:49 -05:00
Abhijeet Kasurde
8606bfde4f
VMware: vmware_guest template find (#35088)
This fix adds logic to find unique virtual machine template using name.

Fixes: #26669

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-01-29 21:39:50 +05:30
Ondra Machacek
2b0ad2c88a ovirt_vms: Add high_availability_priority to ovirt_vms (#35289) 2018-01-29 08:18:38 -05:00
Ondra Machacek
e39156196c ovirt: Fix vms BIOS boot_menu attr compare (#35454) 2018-01-29 08:17:57 -05:00
Abhijeet Kasurde
cb96f8a250 VMware: refactor vmware_dvs_host (#35440)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-01-29 07:56:39 -05:00
Ricardo Carrillo Cruz
d178df8f01
Fix edit_config multiline commands on IOS (#35375)
* Fix edit_config multiline commands on IOS

The current code for multiline commands in IOS is broken: If you
pass a dict containing a command, prompt and answer it is seen
later as unicode string, but if you do a json.loads it fails
as the keys/values are enclosed in single quotes but JSON requires
double quotes.

Fixes #23539

* Fix pep8

* Use ast literal_eval

It's safe to use, as it is just for types and wont execute arbitrary code.
2018-01-29 12:03:25 +01:00
Jean-Philippe Evrard
5f1254697d New module etcd3 (#35053)
This module uses etcd3 python library to do k/v manipulation on
an etcd3 cluster using version3 api.
2018-01-29 11:49:30 +01:00
Abhijeet Kasurde
aa736c6944
VMware: add new module: vmware_host_acceptance (#35040)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-01-29 14:30:57 +05:30
Abhijeet Kasurde
aac6d282e5
VMware: Add new module - vmware_vm_vm_drs_rule (#34177)
This adds a new module called vmware_vm_vm_drs_rule. This module add
affinity/antiaffinity rule for VM-VM in given cluster.

Fixes: #32109

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-01-29 09:36:57 +05:30
Abhijeet Kasurde
8549482482
VMware: add new module: vmware_host_package_facts (#35036)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-01-29 09:21:34 +05:30
Abhijeet Kasurde
3605c19377 VMware: return facts depending upon type of VM (#35419)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-01-28 16:29:40 -05:00
Abhijeet Kasurde
857d0fd62e
VMware: add new module: vmware_host_vmnic_facts (#34984)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-01-28 21:34:45 +05:30
Abhijeet Kasurde
19da03c485 Add random password generation logic in host_add (#30380)
Fix adds ipa host_add functionality of generating random
passwords for host enrollement. This fix also preserves the
idempotency of host_add and host_mod IPA APIs.

Fixes: #30328

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-01-28 09:42:58 -05:00
cakepietoast
85091e7a8e Add runasusercategory and runasgroupcategory parameters for ipa_sudo_rule module (#30421)
* Add runasusercategory and runasgroupcategory parameters

* Add "version_added" to docstring

* Remove redundant "required=False" argument specifications
2018-01-28 01:10:27 -05:00
Dag Wieers
ee2a8ff324
Fix small typo in documentation 2018-01-28 03:43:43 +01:00
pmargara
96dda702f7 cloud:ovirt:ovirt_vms.py: Added 'quota_id','sso', 'boot_menu', 'usb_support', 'serial_console' fields to ovirt_vms module (#34048)
* Added 'quota_id','sso', 'boot_menu', 'usb_support', 'serial_console' fields to ovirt_vms module

* always run ansible-test first

* always run ansible-test first 2

* suggested changes applied
2018-01-27 15:18:09 -05:00
Peter Sprygada
c2d3b9cbd5
refactors nios api shared code to handle provider better (#35393)
* refactors nios api shared code to handle provider better

This change refactors the shared code to be easily shared between
modules, plugins and dynamic inventory scripts.  All parts now implement
the provider arguments uniformly.

This also provides a centralized fix to suppress urllib3 warnings coming
from the requests library implemented by infoblox_client

* fix up pep8 errors

* fix missing var name
2018-01-27 08:03:06 -05:00
Eike Frost
eeeea1406b zabbix_host: add interface definition error checking / defaults (#35366)
* add checking of interfaces, providing defaults or errors if required keys are not defined

* fix so that iteration of interfaces only happens if defined
2018-01-27 05:06:13 -05:00
Toshio Kuratomi
763ecec1b3 Add boilderplate to remove a module but keep documentation. 2018-01-26 15:20:36 -08:00
Fernando Alexandre
5f3b546180 [cloud][AWS] permit tagging of lambda functions (#24889)
* permit tagging of lambda functions

Signed-off-by: fernandoalex <jfernandoalex@gmail.com>

* changed iteritems for items and test for identity to is not

* fixed task name in example

* module object was not being passed to the function

Module object was not being passed to the funtions whitch was causing error in the error handling.

* Use compare_aws_tags

Check for attribute and fail if botocore needs to be updated

Update version_added

* Fix examples

* pep8

* Remove unnecessary var

Handle BotoCoreError
2018-01-26 16:24:38 -05:00
Abhijeet Kasurde
c96bad461f VMware: Fix dvs idempotency issue (#35389)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-01-26 16:23:47 -05:00
Will Thames
56196e66bf [cloud] Improve results from ecs_taskdefinition_facts (#34337)
ecs_taskdefinition_facts should not populate ansible_facts with
so much information.

Better to just return the contents of the dict directly.

Reduce line lengths, use AnsibleAWSModule, don't reimplement
camel_dict_to_snake_dict.
2018-01-26 16:13:22 -05:00
Will Thames
2fac647955 [cloud] ec2_asg should wait for ASG to delete (#35327)
`wait_for_instances: no` means do not wait for instances to become
InService/Healthy before terminating them. It does not mean don't
wait for the ASG to delete.

Not waiting for the ASG to delete can cause problems when recreating it.
Ensure that waiting for the ASG to delete respects `wait_timeout`.
2018-01-26 16:12:21 -05:00
Jeff Li
346063795d Add identity_api_version opt in OpenStack modules (#26103)
Fix #26092 : OpenStack modules does not work with identity v3
2018-01-26 15:08:13 -06:00
Michael Tharp
6dcb41b40f rabbitmq_policy: fix IndexError when no policies exist yet (#33556)
If the list of existing policies is empty, an IndexError would be raised
since stdout was blank.
2018-01-26 22:00:53 +01:00
Sloane Hertel
1454cafd14 [cloud] snake_case hostvars in aws_ec2 inventory plugin (#35306)
* snake_case hostvars in aws_ec2 inventory plugin for improved compatibility with AWS modules

* Format tags with boto3_tag_list_to_ansible_dict
2018-01-26 15:10:45 -05:00
Josh Souza
4af454ed4e [cloud] New AWS module iam_user with check mode support (#27588)
Add `iam_user` module that supports check mode

Based entirely on `iam_group` with check mode support added.
Does not support management of groups, so as not to interfere with the
`iam_group` module.

* Update the copyright

* Remove e.message from exception handling since it is not available on python 3
2018-01-26 14:55:42 -05:00
Henrique Rodrigues
73176d2a1d [cloud] New module aws_az_facts (#20690)
New aws_az_facts module to be able to get facts from AWS availability zones
2018-01-26 14:52:42 -05:00
Henrique Rodrigues
c3a5c075c8 [cloud] New module aws_region_facts (#20689)
* New aws_region_facts module to be able to get facts from AWS regions

* Fix copyright

Handle BotoCoreError too

Remove exception handling around around boto3_conn

Fix docs

Fix version_added

* Update metadata_version

Fix return doc
2018-01-26 14:48:50 -05:00
Ghilli3
60d2a8b6a1 Fortinet FortiManager Scripting Module (#34518)
* Adding new code for new module and new module_utils with the pip pyfmg package

* Changed login and logout functionality and renamed mod_utils file as well as cleaned up PEP8 syntax

* Removing extra Ansible parameters and fixing more syntax issues

* Fixing more syntax issues and comparing against previous FTNT script module

* Changing import location to pass syntax checks

* Fixing pylint errors

* Removing test files

* Add unit tests and enabling a login session check within main in order to throw error if network connection exception

* Fixing syntax issues for adding unit tests

* Changing case for pip package requirements

* adding comments

* adding version restriction on pip package for testing

* adding version restriction on pip package for testing

* More comments

* Fixing documentation errors and add the ability to skip a test if it isn't present

* Fixing Pep8 error with whitespace (tab) in the row
2018-01-26 18:40:12 +00:00
Reto Gantenbein
d32c4ab62e Fix task description of thinpool examples (#35402) 2018-01-26 18:36:10 +00:00
Ryan Groten
34d6f5168f Add -F to usermod -p to force user password update (#26258)
If changing root password, usermod will fail with error "Login root is currently in use\n".  -F avoids this
2018-01-26 12:30:32 -06:00
Ivan Kurnosov
ea2b89c7ae Added +1 to the end in random filter so that it was inclusive (#27215) 2018-01-26 11:36:44 -06:00
Thomas Quinot
101e983f07 Remove incorrect assumption on exception constructors (#35271)
Do not assume that all exception constructors accept a single string
argument. For example UnicodeError's __init__ takes 5 parameters:
encoding, object, start, end, reason.

Also, if e.message is present but empty, fall back on stringifying
the exception occurrence.

Fixes #35270
2018-01-26 11:07:58 -06:00
Matt Martz
7404dc6767 Recursively remove args with omit as as their value, to match suboptions in argument_spec (#35299)
* Recursively remove args with omit as as their value, to match suboptions in argument_spec

* Add test for the new remove_omit function
2018-01-26 11:07:04 -06:00
Carl Buchmann
1a4efca83c fix when using vrf option (#35118)
ping did not include "vrf" keyword in command and would fail.
2018-01-26 22:22:23 +05:30
Sloane Hertel
44171b70c2 [ec2] return instances sorted by id (#35359) 2018-01-26 10:51:17 -06:00
Matt Martz
de2427beaf Add transfer checksum verification in copy module (#35367)
* Add transfer checksum verification in copy module, to ensure that the file was transferred to the remote successfully. Fixes #35029

* Guard on no checksum

* Add version_added
2018-01-26 10:48:08 -06:00
Amol Kahat
e8633b7a22 Added VLAN configuration. (#35343)
Fixes GH 22147

Signed-off-by: Amol Kahat <akahat@redhat.com>
2018-01-26 10:21:59 -06:00
Nathaniel Case
1f1e5c11a9
ios_command: Whitelist some commands starting with configure (#35363)
* Whitelist some commands starting with `configure`

* Add tests for conditional `configure` rejection
2018-01-26 10:55:50 -05:00
Dag Wieers
4fa02d581d Remove 'attempts' from non-looped tasks (#35316)
* Remove 'attempts' from non-looped tasks

* Use self._task.until to determine if we're in a loop

* Undo recent changes to Windows tests
2018-01-26 09:06:03 -06:00
Daniel Shepherd
892fc41190 [cloud] New module: Amazon Egress-Only Internet Gateway (ec2_vpc_egress_igw) (#23941)
* New module: ec2_vpc_egress_igw

* minor pep8 fix and doc update

* add test dir and files

* add tests for gateway module

* fix up return documentation per review

* remove HAS_BOTO3 stuff as it is handled in AnsibleAWSModule per review

* fix an error with failure message and add custom handler for non-existent vpc ID

* add additional tests and update tests per review

* ignore errors on clean up tasks

* update module copyright to newer format

* fix exception handling since BotoCoreError doesnt have response attribute

* actually fix exception handling this time so it works with Py3 as well
2018-01-26 09:22:30 -05:00
Peter Sprygada
f849dc9cad
add extattrs as an option when using nios lookup (#35371) 2018-01-26 06:33:44 -05:00
Christopher Brown
d2d825ccd3 Add ManageIQ OpenStack provider (#34932)
Adds the capability to create OpenStack providers. Because one
of the parameters, keystone_v3_domain_id, is not currently
exposed, it is added as an alias of azure_tenant_id which currently
maps to uid_ems. Work is in progress to fix this.

ManageIQ/manageiq#16802
ManageIQ/manageiq-api#279
ManageIQ/manageiq-providers-openstack#196
2018-01-26 04:56:06 -05:00
Dag Wieers
1c8a872648 win_disk_facts: Prefix facts with ansible_ and use raw values (#35326)
* win_disk_facts: Prefix facts with ansible_

* Return raw values in bytes rather than formatted strings

* Fix Fail-Json message

* Improve examples
2018-01-26 19:46:53 +10:00
Reto Gantenbein
466e1b289b Add thin pool / volume managment to lvol (#19312)
* add functionality to create thin pool / volume on Linux LVM to lvol module

add `thinpool' parameter.
change `lv' parameter to not required.

To create thin poll, specify `thinpool'(, `vg' and `size') parameter and omit `lv' parameter.
It will create thin pool, nameed by `thinpool' parameter.

To create thin volume, specify both `thinpool' and `lv' parameter (also `vg' and `size' paramter is need).
It will create thin volume on `thinpool' pool, named by `lv' parameter.

Thin volume and pool can delete whith 'state=absent' parameter.
Thin volume is resizable like normal volume.
Thin pool can extend, but not reduce. This limitation is in Linux's LVM.

* Add thin volume support

- Based on f816618

- Indicate that either lv or thinpool are required parameters using
AnsibleModule's required_one_of.

- Resolve conflict with snapshot functionality

* Fix typo in documentation

* Fix and simplify logical volume check

* Rebase fixes

* Convert examples to native YAML syntax

* Fix failure with snapshot creation

* Properly fail when trying to snapshot a thinpool volume

* Don't fail when no size given for thin volume snapshot

Fixes ansible/ansible-modules-extras#2478

* Convert old style required property sneaked in through rebase

* Fix 'too many leading #' syntax check
2018-01-26 08:49:51 +00:00
Thom Wiggers
e2af5dfae0 Module to generate Diffie-Hellman parameters (#32620)
* Module to generate Diffie-Hellman parameters

Implements #32577

* Add integration tests for openssl_dhparam

* Slightly refactor check to prevent unnecessary regeneration

* Fix code smell in tests

Highly annoying to have to do this again and again and again as the rules change during the game

* Using module.run_command() and module.atomic_move() from a tempfile.

* Remove underscore variable

Ansible prefers dummy
2018-01-26 08:08:29 +00:00
Felix Fontein
a69445e218 Allowing to write intermediate certificate into file. (#34328)
* Allowing to write intermediate certificate into file.

* Fixing merge errors introduced in 25b1db5 (#34916).
2018-01-26 01:48:13 -05:00
Peter Sprygada
3f556f2e37
adds infoblox dynamic inventory script (#35328)
* adds infoblox dynamic inventory script

* fix up issues from sanity testing

* fix pep8 issues
2018-01-25 14:29:11 -05:00
Ondra Machacek
88c48d1437 ovirt: Support to search entity with additional parameters (#35285) 2018-01-25 14:19:25 -05:00
Pilou
0ce8d389a4 azure_rm_dnsrecordset: fix broken import and minor updates (#34983)
* fix broken import

Error was:
lib/ansible/modules/cloud/azure/azure_rm_dnsrecordset.py:223:0: NameError: name 'ARecord' is not defined

* doc: use formatting functions

* remove unused dict
2018-01-25 09:39:49 -08:00
Trishna Guha
f8a89f120f
update nxos_interface doc (#35350)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-01-25 20:02:02 +05:30
Felix Fontein
e75055923b Changing behavior of new fullchain argument. (#34916) 2018-01-25 08:32:45 -05:00
Trishna Guha
cff4a2d26e
fix *os_config module backward diff (#35332)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-01-25 18:49:20 +05:30
Senthil Kumar Ganesan
2f46f8f944 Added support for new Ansible Infra (network_cli plugin, cliconf, module utils cleanup and test) for dellos10 Support t (#34915)
* Support for network_cli plugin and tests

* Fixed ansible-test * issues

* Fixed Pylint warning

* Fixed the sanity test errors

* Fix YAMLlinter issue - removed blank spaces

* Fixed Python 3 failures

* Fixed the PEP8 issue

* Fix sanity --test validate-modules

* Reverted the changes to the doc fragments
2018-01-25 12:37:27 +00:00