Commit Graph

21846 Commits (88764165ad2bf56af5e23890af87100af85d37ff)

Author SHA1 Message Date
Abhijeet Kasurde e3a073fdb9
ldap_attr: Use byte values instead of str (#41248)
The LDAP values may be of any kind (pictures, bytes, etc.) thus, ldap module enforce a "bytes" type.
We should pass properly encoded values instead of str

Fixes: #39569

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
Sam Doran effa235eb6 Fix typeo in param name (#41287) 6 years ago
Michael Doyle e892646bc7 Change falied_conditions to proper spelling (#41284) 6 years ago
Matt Martz ec42797627 minimal callback doesn't properly respect changed, bring into alignment with oneline (#41273) 6 years ago
Matt Davis 25ab2a8153
fix truncated list functions in ansible-doc (#41281)
* fixed incomplete refactor of instance-level plugin list var
6 years ago
Hideki Saito d7df072b96 Add syslog_facility parameter handling with systemd.journal (#41078)
* Add syslog_facility parameter handling with systemd.journal

- Fixed issue #41072

Signed-off-by: Hideki Saito <saito@fgrep.org>
6 years ago
Sloane Hertel 89cea78e30 Fix async for aws_s3 - fixes #40281 (#40826)
* Fix async for aws_s3

* Add a test that async is able to be used on aws_s3 tasks
6 years ago
Christian Groschupp e59742eccd [aws] Remove walrus conditional in aws_s3 module when using custom s3_url (#36832)
fix aws_s3 module to use custum s3_url.
6 years ago
Abhijeet Kasurde d2a1b75913 VMware: update vmware_guest_tools_wait examples (#41246)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
Will Thames 46886f8249 Improve aws_s3 permission handling for non S3 (#38574)
* Test case for missing permissions

* Update aws_s3 module to latest standards

* Use AnsibleAWSModule
* Handle BotoCoreErrors properly
* Test for BotoCoreErrors
* Check for XNotImplemented exceptions (#38569)

* Don't prematurely fail if user does not have s3:GetObject permission

* Allow S3 drop-ins to ignore put_object_acl and put_bucket_acl
6 years ago
Andrew Gaffney 0ff04ad41b Fix wrong python keyword (followup to #36357) (#41067)
Also add tests around that code path
6 years ago
Matt Martz c403f01971
Revert #39365, improve error messaging (#41208)
* Revert " Update TaskInclude _raw_params with the expanded/templated path to file (#39365)"

This reverts commit 4b01b92cfe.

* Improve error messaging, catch error templating parent path
6 years ago
Ganesh Nalawade 24c0f6f872
Fix ios_user integration test failure (#41252)
* If the command input is dict from module
  in that case the check to see if command is
  end or `!` to exclude it from executing on remote
  host is wrong. Fix the logic to check `end` and
  `!` commands
6 years ago
Will Thames b235cb8734 aws_eks_cluster: New module for managing AWS EKS (#41183)
* aws_eks: New module for managing AWS EKS

aws_eks module is used for creating and removing EKS clusters.

Includes full test suite and updates to IAM policies to enable it.

* Clean up all security groups

* appease shippable

* Rename aws_eks module to aws_eks_cluster
6 years ago
Sumit Jaiswal 2c2af87b2e
Metadata change to 'core' for 2.5 supported NIOS modules (#41244)
* changing metadata to core support

* changing metadata to core support

* changing metadata to core support

* changing metadata to core support

* changing metadata to core support
6 years ago
Deepak Agrawal 12be102758
DCI failures (#41241) 6 years ago
Timur Evdokimov c29fe66edf fixed passing non-default base_url from explicitly set cloud_environment (#40225) 6 years ago
Richard Schwab edb1735ca0 Add some dots at the end of sentences (#41176)
See e.g. https://docs.ansible.com/ansible/devel/reference_appendices/config.html#default-scp-if-ssh
In the docs the list of strings is just concatenated without additional interpunctuation.

+label: docsite_pr
6 years ago
William Lorenzo a73585552f Update vmware_host_lockdown.py (#41189)
esxi_hostname should be 'list' instead of 'str'
6 years ago
Brian Coca 8e4c56d773 only add group if properly defined
also corrected skip message as this has to do with type, not name

fixes #40850
6 years ago
Brandon W Maister 453a6f4047 Improve error message if policy_document does not exist (#40094) 6 years ago
Sloane Hertel 387c37e255 aws_s3: don't decrypt file before uploading - fixes #39287 (#39634)
* aws_s3: do not decrypt file before uploading to bucket

* changelog
6 years ago
Abhishek Garg 0512e9656b [aws] Doc fix for aws_ses_identity (#41194)
Examples have a typo of ses_identity instead of aws_ses_identity. Fixed that and proposing these changes here.

+label: docsite_pr
6 years ago
Brian Coca 1a70681630 ensure all config sources for ssh options 6 years ago
Matt Davis 087efe4232
fix ansible-doc regression from missing plugins (#41167) 6 years ago
Kevin Breit 2be2a572d6 Meraki utility now loads() JSON (#40856)
* Changed request() to run json.loads() instead of module doing it
- Removed json.loads() from modules
- Removed some unreliable integration tests
- Removed self.function setting in construct_path()
-

* PEP8 changes

* Remove debug line for push
6 years ago
Will Thames f61164406e [aws] Support custom KMS keys in `aws_s3` module (#35761)
* Allow the use of 'aws:kms' as an encryption method
* Allow the use of a non standard KMS key
* Deduce whether AWS Signature Version 4 is required rather than specifying with a parameter
6 years ago
René Moser 146cc2dd9c
cloudwatchevent_rule: doc: fix schedule_expression in example (#41138) 6 years ago
Nathaniel Case 49fddb6f28
Expand ios password prompt regex (#41131) 6 years ago
epicanthal 12d221152b Update ios_facts.py (#40928)
Account for upper/lower case match occurrences of "[Nn]umber" and "[Ss]erial"

Model Number                       : WS-C3850-12X48U
System Serial Number          :  <removed>
6 years ago
Will Thames a60fe1946c Remove ECS policies from AWS compute policy
The compute policy was exceeding maximum size and contained
policies that already exist in ecs-policy.

Look up suitable AMIs rather than hardcode

We don't want to maintain multiple image IDs for multiple regions
so use ec2_ami_facts to set a suitable image ID

Improve exception handling
6 years ago
Michael Mayer fbcd6f8a65 Add Fargate support for ECS modules
Fargate instances do not require memory and cpu descriptors. EC2 instances
 do require descriptions. https://botocore.readthedocs.io/en/latest/reference/services/ecs.html#ECS.Client.describe_task_definition

Fargate requires that cpu and memory be defined at task definition level.
EC2 launch requires them to be defined at the container level.

Fargate requires the use of awsvpc for the networking_mode. Also updated,
the documentation regarding where and when memory/cpu needs to the assigned.

The task_definition variable for the awspvc configuration colided with
the ecs_service for the bridge network. This would cause the test to fail.

Add testing for fargate

Add examples for fargate and ec2
6 years ago
Jon Steinich 8eb9cc3217 add launchType to ecs_service per #35607
update ecs_taskdefinition to support fargate tasks per #35607
6 years ago
Martin Krizek 23a337918c
first_found: fix examples to match the code (#40821) 6 years ago
Martin Krizek 77e2bd5f8e
Fix inserting noop tasks by using active state (#36056) 6 years ago
Clint Byrum 6635748c8f Enable check mode for docker_image_facts (#38944)
This module never changes anything. As such, there is no reason not to
just enable check mode.
6 years ago
Achintha Gunasekara d98c892017 Adding a switch to output docker logs (#40693)
* Adding a switch to print logs

* Update to docs

* Adding `version_added` for the new option

* Updating version added

* Moving `output_logs` before `paued` for alphabetically ordering.
6 years ago
Martin Krizek 5f7ffd39dc
Warn when cond is used on meta tasks that don't support them (#41126) 6 years ago
David Moreau Simard 828e33f419 Do not consider an empty version string as a version (#41044)
When using an empty string as the version argument, the module would
before attempt to run something akin to:

    pip install module==""

This changes the behavior to:

    pip install module

Fixes #41043
6 years ago
Abhijeet Kasurde 63d993e07f Minor typos in galaxy cli (#41083)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
Baptiste Clavié 3b2f5dd606 composer: add new autoloader options (#40439)
* Add support for classmap-authoritative option for composer

* Add support for apcu-autoloader option for composer

* Fix a typo for the no-plugins option
6 years ago
Ganesh Nalawade ba4b12358c
Refactor ios cliconf plugin and ios_config module (#39695)
* Refactor ios cliconf plugin and ios_config module

*  Refactor ios cliconf plugin to support generic network_config module
*  Refactor ios_config module to work with cliconf api's
*  Enable command and response logging in cliconf pulgin
*  cliconf api documentation

* Fix unit test and other minor changes

* Doc update

* Fix CI failure

* Add default flag related changes

* Minor changes

* redact input command logging by default
6 years ago
saichint 9abc3dbec4 nxos_rpm module (#40849)
* Add nxos_rpm feature

* fix timing issues

* fix timing issues

* shippable fix

* review comment

* review comments fixes

* typo fix
6 years ago
Abhijit Menon-Sen 276358c885
Introduce inventory.any_unparsed_is_failed configuration setting (#41171)
In the process of building up the inventory by parsing each inventory
source with each available inventory plugin, there are three kinds of
possible errors (listed in order from earliest to latest):

1. One source could not be parsed by a particular plugin.
2. One source could not be parsed by any available plugin.
3. ALL sources could not be parsed by any available plugin.

The errors in (1) are a part of normal operation, e.g., the script
plugin is expected to fail to parse an ini-format source, and we will
ignore that error and try the next plugin. There is currently no way to
control this, and no known compelling use-case for a setting to control
it. This commit does not make any changes here.

We implement "any_unparsed_is_failed" to handle (2) above. If enabled,
this requires that every available source be parsed validly by at least
one plugin. In an inventory comprising a static hosts file and ec2.py,
this setting will cause a fatal error if ec2.py fails (a situation that
attracted only a warning earlier).

We clarify that the existing "unparsed_is_failed=true" setting causes a
fatal error only in (3) above, i.e., if NO inventory source could be
parsed. In other words, if there is ANY valid source in the inventory
(e.g., an ini-format static file), no combination of errors and the
setting will cause a fatal error.

If you want to execute your playbooks when your inventory is…

    (a) complete, use "any_unparsed_is_failed=true".
    (b) not empty, use "unparsed_is_failed=true".

The "unparsed_is_failed" setting should be renamed to
"all_unparsed_is_failed", but this commit does not do so.

Fixes #40512
Fixes #40996
6 years ago
Toshio Kuratomi cef4d862bc
Better error message if the template is not utf-8 encoded (#41030)
* Better error message if the template is not utf-8 encoded

Also document this in the porting guide
6 years ago
Matt Davis 980cdbe679 pin azure deps to exact versions
* added warnings for newer-than-expected versions
* prevent passing api_version and profile for newer clients
6 years ago
Toshio Kuratomi 461a2733e6 Make admin_users only contain root and toor because admin is used for non-privileged accounts
This fixes one specific instance of failure to chown from a privileged
account:
https://github.com/ansible/ansible/issues/16052#issuecomment-384976615

Fixes #41160
6 years ago
Yunge Zhu 46eceba395 fix issue #41081 in azure_rm_securitygroup (#41123)
* fix issue #41081

* resolve comments

* fix lint
6 years ago
Zhikang Zhang 8c15d71783 Fix typo in decrypt doc. (#41149)
Prior to this change, the document cannot render the default choice of decrypt correctly.
6 years ago
Ben Thomasson 01e1b51e33 Fix typo in the ansible-inventory --host error (#41142) 6 years ago
permitanyany a9dc79e07b Update nclu.py (#40369)
* Update nclu.py

Added NCLU BGP Unnumbered Example
+label: ansible/ansible#40323

* Update nclu.py

* Adding AS number example
6 years ago
Jackson Isaac 3d6312885f eos/eos_l3_interface.py: Add SVI Example (#40349) 6 years ago
jeanfabrice 6349932fff Add support for loadbalance_loadbased to DVS portgroup teaming policy (#40242)
* Add support for loadbalance_loadbased to DVS portgroup teaming policy
* Add note about version_added
6 years ago
Anil Kumar Muraleedharan 1ccff0de1a Fixing copy paste issue (#41121) 6 years ago
Deric Crago 9387c75e29 reverting changes from a0b4462a to avoid casting strings to ints (#40131) 6 years ago
Andrew J Huffman fb61680ccd Updating tower_job_template.py (#38821)
* Updating tower_job_template.py

* tower_job_template: Update parameter version_added to 2.7

* Ensure that unset credentials aren't passed

Passing empty strings for unset credentials causes ValueErrors as
the API expects an integer. Don't pass unset credentials
6 years ago
Adrien Fleury fc2c8a4ec8 Module: Tower inventory source module (#37110)
* tower_inventory_source: Add support for the inventory source via ansible-tower-cli.

* Add test coverage for tower_inventory_source.

* Update version_added to 2.7
6 years ago
saichint 6733bffd5d fix nxos_snapshot issues (#41034)
* fix nxos_snapshot issues

* review comments

* doc change
6 years ago
Deepak Agrawal 2db6a8c26a
iosxr_config crash if config has route-policy with multiple levels of 'ifelseif' and other caveats (#41091)
* diff in as-path-set or prefix-set

* fix caveat diff can not have last line with comma in prefix-set/as-path/community-set

* Simplify fix to include indentation before parse

* remove debugger

* route-policy diffs

* fix iosxr_config crash issue

* new changes in iosxr_config after git add

* end-policy-map and end-class-map are properly indented so match misplaced children only when end-* is at the beigining also fix pep8

* Remaining config blocks of route-policy which needs exclusion from diff. added new tests

* pylint/pep8 warnings

* Review comments , sanity test fix

* shbang warning

* remove unused import
6 years ago
Matt Davis 096d243526 adds ansible-doc JSON plugin data dump
* used for changelog generation of new plugins
6 years ago
Dusan Matejka 6ef2ffe310 Zabbix facts (#41084)
* added validate_certs option to zabbix_*_facts modules and fixed documentation to use doc fragment

* removed code duplication from zabbix_host_facts module
6 years ago
Tim Rupp 457c813d46
Fixes not using the parent parameter (#41102)
The parent parameter was not being used in the module. This meant
that all child profiles would use the system-defined parent instead
of the parent specified in the module
6 years ago
Tine Jozelj ab96a84154 Fix ec2_ami block_device_mapping volume_size to be int in 2.5 (#40938)
* fix ec2_ami block_device_mapping size to be int

* fixed cr issues

renamed `type` to `attribute_type`
reused `new_item` instead of creating new variable `value`
6 years ago
Nathaniel Case 92a95368fe
Fixes to ios_logging (#41029)
* Logging size may not show up in config

* This is much simpler

* Avoid repetition in tests

* Both options of buffered are optional
6 years ago
Abhijeet Kasurde 13c7d149bb openstack: Correct fail_json call in module_utils (#41064)
Fixes: #40925

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
Trishna Guha 72d630b831
fix nxos_udld failing with httpapi (#41074)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
6 years ago
Yuwei Zhou e6e08a0174 normalize the resource location (#40802) 6 years ago
saichint b6afb77a8a fix nxos_banner issue (#41026) 6 years ago
Tim Rupp 033adf8cd5
More correct fix for status problem (#41045)
Status is not being determined right when monitors are enabled but
the state is up or down. This patch fixes it.
6 years ago
Adam Miller c65f3fdca6 BSD UTC timezone is not always idempotent (#40855)
Signed-off-by: Adam Miller <admiller@redhat.com>
6 years ago
Ryan Brown 7f8654d586 Add minimum botocore and boto3 checking to AnsibleAWSModule (#41005)
* Add minimum botocore and boto3 checking to AnsibleAWSModule
6 years ago
Tim Rupp 2daf5f3edb
Correct states in bigip_pool_member (#41035)
Fixes: #40631

The module was not correctly handling a certain state where the node
could be down, but the monitor was enabled on the node.

This patch fixes it.
6 years ago
Sam Doran 479b26fe31 Do not try to import simplejson in jsonfile.py (#40983)
With the addition on ajson.py in cbb6a7f4e8, two
new classes were created: AnsibleJSONDecoder and AnsibleJSONEncoder. These
classes are used when calling json.looads() and json.dumps().

This works fine with everything except the jsonfile.py cache plugin, which would
first try to import simplejson as json, then fall back to json. When simplejson
is installed, the load() or dump methods from simplejson are called, which then
try to use the AnsibleJSONEncoder/AnsibleJSONDecoder subclass from ajson.py.
But asjon.py imports json, not simplejson, and things blow up.
6 years ago
Nathaniel Case 70e3a7c9e1
Don't try to reuse ansible_port, it doesn't work that way (yet?) (#41022) 6 years ago
Tom Wassenberg 6097776dc0 Fix flag in debug message (#40753)
The debug message stated that the vault password client script was invoked as `example.py --vault-id=example`, while it's actually `example.py --vault-id example`.
6 years ago
Matt Martz d4930e6692
Add requests.Session like class (#37622)
* Adds requests.Session like class

* py2 syntax fix

* Add a few examples to the Request docstrings

* Add helper methods and docs

* Fix test failures

* Switch tests to test Request instead of open_url, add simple open_url test to validate funcitonality

* Fix filename in replace-urlopen code smell test
6 years ago
Brian Coca c86fd6e2df Fix error reporting on bad type for config setting 6 years ago
s-hertel c1400ce909 Fix cache timeout behavior 6 years ago
Tim Rupp 8bccd0830b
Re-allow SSH due to broken delegation (#40978)
Removes the SSH enforcement because it breaks situations where, for example,
an admin maintains Ansible Tower and another team needs to use Ansible
with the BIG-IP modules, but the Tower admin does not want to install
the F5-SDK on the Ansible Tower instance.

In this situation, the user needs to delegate the execution of the BIG-IP
module to another linux host that does have the dependencies installed.

Usually this is done with delegation, often over SSH. Limiting the SSH
connection here prevents this from working.
6 years ago
Daniel Jaouen e90265e716 homebrew_tap: fixes #40853 (#40863) 6 years ago
Matt Davis 5228b939fe
update 2.7 codename 6 years ago
Tim Rupp 0cecc08886
Fixes variable usage in bigip device trust (#40975)
Variable used was incorrectly named
6 years ago
Brian Coca bcabbe33c8 terms 6 years ago
Brian Coca cbedbd3c9c enforce required config 6 years ago
Adam Miller 39f7e055a4 Add ignore_unknown_extensions to include_vars for dir (#35809)
processing to ignore non-valid file extensions

Fixes #35745

Signed-off-by: Adam Miller <admiller@redhat.com>
6 years ago
Ryan Brown 52b79a87ee
Terraform: Pass module targets to terraform plan as well as apply (#40958)
* Pass module targets to terraform plan as well as apply

* Fix undefined variable

* Add target for plan-only operation
6 years ago
Nathaniel Case 91fd98a2bd
Complain if API response is not JSON (#40966) 6 years ago
Matt Martz da4ff18406
Support 'apply' to apply attributes to included tasks - Impl 1 (#39236)
* Support 'apply' to apply attributes to included tasks

* Cannot validate args for task_include

* Only allow apply on include_

* Re-enable arg validation, but only for include_tasks and import_tasks

* s/task/ir/

* Add tests for include_ apply

* Include context with AnsibleParserError

* Add docs for apply

* version_added

* Add free-form documentation back

* Add example of free-form with apply
6 years ago
Matt Martz 961484e00d
Add src parameter for uri module that can be used in place of body. Supports binary files (#33689)
* First pass at a src parameter that can be used in place of body. Supports binary files

* Add test for uri src body

* Bump version_added to 2.6

* Close the open file handle

* Add uri action plugin that handles src/remote_src

* Document remote_src

* Remove duplicate info about remote_src

* Bump version_added to 2.7
6 years ago
Trishna Guha 0fd7d7500a
revert 40940 and fix nxos output truncated issue (#40960)
* revert 40940

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* revert #40655 fixes output getting truncated issue for nxos

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
6 years ago
Matt Martz 079318bf4a Honor ignore_errors when invoking the debugger, add config to disable this behavior (#39868)
* Honor ignore_errors when invoking the debugger, add config to disable this behavior. Fixes #39863

* Limit ignore_errors logic to failed
6 years ago
Nathaniel Case e7afd3d378
Search for macaddresses more stringently (#40901)
* Search for macaddresses more stringently

Fixes #40829
6 years ago
Nilashish Chakraborty a013cdc747
Fixes ios_logging idempotency issues (#40701)
* Fixes ios_logging idempotency issues

* Added intergration tests & minor fixes

* Minor fixes in tests

* Minor fixes in tests #2

* eos_logging fixes after PR review
6 years ago
James Mighion 083ddb9bc2 Adding changed option to save_when for aireos (#40681)
* Adding changed option to save_when for aireos

* Deprecating save option for aireos_config.

* Updating version_added to 2.7 since the PR missed the window for 2.6
6 years ago
Trishna Guha 5350d0697f
revert #40655 fixes output getting truncated issue for nxos (#40940)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
6 years ago
Ondra Machacek 142cc48ca9 ovirt_templates: Add searching by cluster (#40934)
* ovirt_templates: Add searching by cluster

* ovirt_disks: Add searching by sd and vm_name

* Fix python syntax
6 years ago
Ondra Machacek 43af09fc8f ovirt_vms: Fix change cd (#40939)
* ovirt_vms: Fix attaching of CD

* ovirt_vms: Fix idemptency
6 years ago
Blair Rampling 55de3d07c5 adds alias parameter to nios_host_record (#39469) 6 years ago
jctanner a9e53cdb68 Allow config to enable native jinja types (#32738)
Co-authored-by: Martin Krizek <martin.krizek@gmail.com>
6 years ago
Sumit Jaiswal 81510970ae
Fix for updating the name in case of host record and network view and also display meaningful error in case of connection timeout (#40597)
* To fix following github issues 35774, 36574 and 39494

* To fix following github issues 35774, 36574 and 39494

* To fix following github issues 35774, 36574 and 39494

* To fix following github issues 35774, 36574 and 39494

* To fix following github issues 35774, 36574 and 39494

* To fix following github issues 35774, 36574 and 39494

* removed old_name new entry to make ui cleaner

* removed old_name new entry to make ui cleaner

* removed old_name new entry to make ui cleaner

* removed old_name new entry to make ui cleaner

* removed old_name new entry to make ui cleaner

* removed old_name new entry to make ui cleaner

* to resolve the bug 40709

* reslove shippable error

* reslove shippable error

* reslove shippable error

* reslove shippable error

* reslove shippable error

* reslove shippable error

* reslove shippable error

* reslove shippable error

* reslove shippable error

* to fix shippable nios automation error

* modified the name input parsing method

* modified the name input parsing method

* modified the name input parsing method

* modified the name input parsing method

* modified the name input parsing method

* modified the name input parsing method

* modified the name input parsing method

* modified the name input parsing method

* modified the name input parsing method

* shippable error fix

* shippable error fix

* shippable error fix

* shippable error fix

* shippable error fix

* review comment fix

* shippable error fix

* shippable error fix
6 years ago
Matt Davis f87ca27aa3
use PEP-440-compliant formatting of dev tag 6 years ago
Matt Martz ad7ba91f75 Use _remote_is_local=True for local connection in synchronize (#40833)
* All instances of local connection should use _remote_is_local=True. Fixes #40551

* Switch to instance attribute for synchronize

* Add test that shows that synchronize _remote_is_local addresses tmpdir building
6 years ago
Matt Martz 96ec32630e Deprecate squash_actions (#35978)
* Deprecate squash_actions

* Wording update

* Update wording and version

* Update versions to reflect 2.7 deprecation

* Add 2.7 porting guide
6 years ago
Fabian von Feilitzsch 4d77878654 K8s dynamic collected changes (#40745)
* Move k8s modules to dynamic backend

* update required openshift version

* update -> patch

* use new dynamic client exceptions

* style

* guard urllib3 import

* guard ansibleerror import

* give more information about error cause

* format in variable

* style

* rename tests

* Search for provided kind in a few more places to match old behavior, properly handle failure

* make common code use fail instead of fail_json, to work for lookup plugins as well

* update docs

* move openshift_raw tests into k8s tests

* fix typo

* Use diff of response and resource to determine change, don't do any checking client-side before making requests

* remove duplicate yaml blocks

* Update porting guide for k8s module

* remove invalid doc refs

* If fuzzy searching finds a resource, update resource_definition to match proper kind and version

* remote unsupported openshift_raw variables

* properly check environment variables when determining auth method:
6 years ago
Nathaniel Case 82dfa542c2
Replace bogus (but routeable) ip addresses with RFC 5737 example addresses (#40554)
* Remove 1.1.1.1 from *_config tests

* remove from *_smoke and *_system

* Miscellaneous other tests

* Remove from module documentation as well

* Remove from unit tests as well

* Remove accidental duplication from rebase
6 years ago
Abhijeet Kasurde 91eb4a034e Use get_option instead of _options.get API
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
René Moser 4006f1ba40 ec2_lc: fix state doc matching arg_spec (#40792)
* ec2_lc: fix state doc matching arg_spec

* Remove unused variable
6 years ago
Nilashish Chakraborty b9ea646839
Fixes eos_logging idempotence issue #31862 (#40604)
* eos_logging idempotence fix

* fixed eos_logging idempotence issue

* Fixed pylint and pep8 errors

* Added tests for eos_logging & minor fix

* Removed q statements
6 years ago
Trishna Guha 786ec14e54
fix nxos dci failures (#40871)
* fix structured output for nxos_linkagg

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* fix TypeError for nxos_interface

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
6 years ago
Anil Kumar Muraleedharan 8ece8679d8 Lenovo typofix (#40865)
* Changing Lenovo Inc to Lenovo and update License file to be consistent.

* Typo correction of ENOS to CNOS
6 years ago
Guillaume Grossetie 5ffa1a1b2a Add a module to create a java key store (jks) from a certificate (#35273)
* Add a module to create a java key store (jks) from a certificate
* Create a jks from a certificate and a private key (secured by a password)
* Add an option to recreate the jks (useful when you want to update the jks password)
* If the certificate changed, recreate the jks
* Version added is now 2.7
6 years ago
Eike Frost b72e3bb568 Documentation/default fix for keycloak modules (#37192)
* fix validate_certs doc and remove default for auth_client_id

* document admin-cli default instead of removing it
6 years ago
Markus Juenemann 46e03ec866 Fix typo in if statement in snmp_facts module. (#39578) 6 years ago
Sloane Hertel 7d2c71462d gluster_volume: add 'volume' alias to 'name' param (#40845)
* gluster_volume: add 'volume' alias to 'name' param

* remove gluster_volume from validate-modules/ignore.txt
6 years ago
Arie Bregman 1c3a117f83 doc: add name to tasks in ini_file module examples (#38888)
One of Ansible best practices is "Always Name Tasks".

This should include tasks in examples as well so people can learn
what is the right way to use it.
6 years ago
Pilou de385560a8 jenkins_jobs: fix typos (#40844)
* jenkins_job: fix typos

* jenkins_job: add type for 'enabled' parameter
6 years ago
James Cammarata ee519e0d0a
Add a helper to PlayIterator to recursively find the active state (#40847)
Also fixes a discovered bug in block rescue detection related to inserting
the ansible_failed_{result|task} variables when the rescue is in a nested
block.
6 years ago
Nathaniel Case 20f93816d6
Fix eapi tests to use become (#40838)
* Return the expected prompt character based on become status

* Update eos_banner tests for eapi

* Update eos_config tests for eapi

* Update eos_facts tests for eapi

* Update eos_interface tests for eapi

* Update eos_l3_interface tests for eapi

* Update eos_lldp tests for eapi

* Update eos_logging tests for eapi

* Update eos_smoke tests for eapi

* Update eos_system tests for eapi
6 years ago
Ricardo Carrillo Cruz 669949e6a3
Do not gather mem facts if command invalid (#40820)
* Do not gather mem facts if command invalid

In some firmwares, 'show memory statistics' fail, thus
do not populate mem if we got a failure after running that command.

* Fix pep8

* Warn if got error when running 'sh memory statistics'

* Fix pep8
6 years ago
Trishna Guha 17b6ecf101
nxos_vlan fix (#40822)
* nxos_vlan fix

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* uncomment mode test as nxapi now has get_capabilities

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
6 years ago
Trishna Guha a7421e8611
httpapi fix nxos (#40806)
* httpapi fix nxos

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* nxos_hsrp fix

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
6 years ago
Matt Martz 36c8441c6d New module vmware_deploy_ovf (#30309)
* First pass at vmware_deploy_ovf functionality
* Add OVA file support, re-structure code
* Move some useful functions to module_utils.vmware, and perform a little DRY too
* Better handling of errors during spec validation and import
* Properly calculate the lease progress percentage for all vmdk files
* Make warnings and errors a little better
* Add an allow_duplicates argument, that defaults to true, to allow users to have name based idempotency
* Add fail_on_spec_warnings to cause the module to treat warnings as errors
* Support non-vmdk uploads
* Add ova alias for ovf
* Rename vmdk_post_url to device_upload_url so it does not sound to specific to VMDK files
* Safer handling of * hostname in urls
* Add default Content-Type, remove unused headers var
* Add deploymentOptions and propertyMapping functionalities
* Add basic check_mode support
* Add vmware_deploy_ovf to list of use-argspec-type-path ignores
* Update version_added and fix path for use-argspec-type-path
* Add configurable folder
* Doc changes
6 years ago
Mike Wiebe 9f026309a6 Update nxos_install_os module (#40102)
* Add nxos_install_os integration tests

* Update call to check timers

* Update check_ansible_timer method

* Modify network_cli integration tests

* Add timer check for nxos_install_os

* Add comments for clear_persistent_sockets

* Update connection info for tests

* More updates

* Restructure files for provider and non-provider testing

* Update env var name and add check for ISSU switchover
6 years ago
Trishna Guha b4baa2d484
fix nxos_vrf and migrate get_interface_type to module_utils (#40825)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
6 years ago
Brian Coca 970fd54d12 moved gluster_volume to new home 6 years ago
Monty Taylor 123b01aaeb Bump python support version for openstack modules (#40750)
The openstack modules do not support python 2.6 as the underlying
library dependency (openstacksdk) does not support python 2.6. Update
the docs to make this clear.
6 years ago
Ricardo Carrillo Cruz 026de6bcb0
Command authorization failed ios regex (#40819)
* Add 'Command authorization failed' to stderr regex list

* Add missing comma

* Remove superfluous comma
6 years ago
Johannes Brunswicker cb636eb522 Fix for #40782 (#40783)
* check if timestamp is set in maven-metadata.xml. If it is not set, we don't have unique snapshot artifacts and can return the artifact name with the appended -SNAPSHOT
6 years ago
Werner Dijkerman b304b9bbf1 Make use of a better python module for gitlab_group (#40764)
* Make use of a python module that is not deprecated anymore

* Updating version_added: "2.6" to version_added: "2.7"

* Added missing line

* Added notification about using different python module
6 years ago
Michael Miko 1645db3cee New module: Add monitoring/zabbix_host_facts module (#39653) 6 years ago
Mário Santos 9d52e54ae6 Add extra_specs to os_subnet module
PR #39373

* Add extra_specs to os_subnet module

This change removes the parameter limitation on `os_subnet` module for
Neutron subnet creation.
This way, any key value passed via `extra_specs` argument is included in
shade's API call.

Signed-off-by: Mário Santos <mario.rf.santos@gmail.com>

* Set default value of extra_specs to None

Signed-off-by: Mário Santos <mario.rf.santos@gmail.com>

* Raise ValueError in case of duplicate keys found

Signed-off-by: Mário Santos <mario.rf.santos@gmail.com>

* Update docs default value of extra_specs to {}

* Move cidr to kwargs to avoid positional argument

Signed-off-by: Mário Santos <mario.rf.santos@gmail.com>

* Print explicit list of duplicate keys

Signed-off-by: Mário Santos <mario.rf.santos@gmail.com>

* Fix precedence on the dict merge

Signed-off-by: Mário Santos <mario.rf.santos@gmail.com>

* Bump version_added of the extra_specs parameter

Signed-off-by: Mário Santos <mario.rf.santos@gmail.com>
6 years ago
cosmix 4ae4e80cc3 Add support for mysqldump --ignore-table switch (#33065)
* Add support for `mysqldump`'s `--ignore_table` switch.
* Fix documentation and default linter warning re: default parameter
* Add number to replacement field in cmd string
* Bump version_added to 2.7
6 years ago
Matt Martz b07f779296 Update dnf module argument_spec and docs to match (#39819)
* Update dnf module argument_spec and docs to match. Fixes #39800

* Always evaluate autoremove as boolean
6 years ago
Blair Rampling 6d88b689d2 adds nios_cname_record module (#37678) 6 years ago
Blair Rampling b33369d87c adds nios_srv_record module (#37676) 6 years ago
Blair Rampling f5ecd3725b adds nios_mx_record module (#37583)
* adds nios_mx_record module

* fixes a typo in the examples
6 years ago
Blair Rampling 484ffd20b4 adds nios_a_record module (#37582) 6 years ago
Blair Rampling 0bc916ec61 adds nios_aaaa_record module (#37580) 6 years ago
Blair Rampling 9785cab973 adds name server group support to nios_zone (#37543)
* adds name server group support to nios_zone

* fixes style issues

* adds support for restart_if_needed

* adds type: bool to documentation for restart_if_needed

* doc fix
6 years ago
Yuwei Zhou 7b9864776a Fixes #39648 azure_rm_virtualnetwork not handling DNS settings properly on existing virtual networks (#40646)
* check nullable

* add test

* fix

* fix
6 years ago
Zim Kalinowski dde48560fb fixing container instance sanity & integration tests (#40774) 6 years ago
Zim Kalinowski bf5cd98a2b removed unnecessary version_added values (#40773) 6 years ago
Sviatoslav Sydorenko 07c714790e Do absolute imports to please broken import linter 6 years ago
Sviatoslav Sydorenko 6cafa73441 Add is_iterable utility function 6 years ago
Sviatoslav Sydorenko 52219c4d55 Add is_sequence util function
This is a helper for identifying whether the var is a sequence,
but is not of string-like type (optionally).

Co-authored-by: Toshio Kuratomi <toshio@fedoraproject.org>
Co-authored-by: Brian Coca <briancoca+dev@gmail.com>
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
Sviatoslav Sydorenko eb209e92c9 Move collections abc shim to _collections_compat 6 years ago
Sviatoslav Sydorenko 912bd25a4e Drop deprecated Python 2.4 compat shim 6 years ago
Sviatoslav Sydorenko e1ae082a1e Partially python3fy ansible.module_utils.basic
Adding
    __metaclass__ = type
breaks things, so I didn't include it.
6 years ago
Tim Rupp dc08bca1fd
Fix connection error reporting (#40758)
The variables used for reporting errors were incorrect. Additionally,
the fetching of connection related params was using an old format.
6 years ago
Tim Rupp 547a1ed67d
Fixes parameters to fail_json (#40756)
The number of parameters was incorrect. This patch fixes it.
6 years ago
Jeffrey Zhang f488d3cf79 Fail with more meaningful message when the volume can not be found (#37508) 6 years ago
Adam Miller 78023e79d7
Revert "Move k8s modules to dynamic backend (#39632)" (#40743)
This reverts commit 4373b155a5.
6 years ago
Matt Clay 65084df2c9 Initial commit for 2.7.0 development. 6 years ago
Vasily Angapov e2bd4adf6e os_image_facts: add ability to list all Openstack images 6 years ago
Dave Buckley 02cb0fd30d fix capitalization on os_project_access examples (#37965) 6 years ago
Jesse Pretorius 8690937fb3 Correct the OpenStack plugin example config (#40460)
The current example configuration is not
quite right, so this patch implements a
fix which corrects it

The 'inventory_hostname' argument is removed
as it's the same value as the default.
6 years ago
Artem Goncharov 89ce826a9f retire shade in favor of openstacksdk for openstack modules (#40532)
* Establish connection through openstacksdk
* Switch from shade to openstacksdk
* fix typo in link to openstacksdk
* remove nova_client usage
* further remove of min_version from openstack modules
6 years ago
Kevin Breit e16490c9c0 [WIP] New module - meraki_admin (#39837)
New module - meraki_admin
6 years ago
Kevin Breit d5b3ffc51e New module - meraki_snmp (#39882)
* Initial commit for meraki_admin module

* Initial commit for meraki_snmp module

* Update code to be operational for SNMP settings
- Add optional_ignore value to is_update_required for one-time fields
- Write documentation
- Perform checks and execute changes

* Minor fixes and test improvements
- Fix some documentation errors
- Implement and test for idempotency

* Removed meraki_admin which shouldn't be there, ansibot changes

* Rename params to be lower case
- Updated integration tests
- Changed CamelCase to lowercase and underscore

* Code cleanup changes based on comments from Dag.
6 years ago
Pierre Roux 81de7582d9 Fix tower_* modules **params kwargs (#40137)
* Add cleaning function to handle **params

The cleaning function is only added to tower modules which pass a `**params`
argument as an unpacked dictionnary to the tower-cli method calls.

Fix #39745

* Remove previous code added only for tower_role

In 872a7b4, the `update_resources` function was modified so that it would clear unwanted
parameters. However, this behaviour is desired for other modules too, modified in
another commit. (see tower_clean_params).
6 years ago
Ed Costello c4536bc827 Support check mode in aws_ses_identity module (#38422)
* Port aws_ses_identity module to use AnsibleAWSModule

* Support Check Mode in aws_ses_identity

* Add tests for check mode

* Move feedback forwarding parameter check to before any changes are made.
6 years ago
Strahinja Kustudic 0781a7f68c Fixed check_mode status to be the same as normal execution (#40721)
* Fixed check_mode status to be the same as normal execution

* Now when setting the status to `disabled` in check_mode it correctly
returns the state changed and prints a warning like it does in normal
model. Before it always returned changed even if everything was set
correctly and a reboot was required.

* Add changelog entry


Co-authored by: Strahinja Kustudic <kustodian@gmail.com>
6 years ago
Konstantin Gribov f2d4912f29 module_utils/facts: override pkg_mgr for ALT Linux (#38004)
Overrides `pkg_mgr` fact to `apt_rpm` if:
- found package manager is `apt`;
- `/usr/bin/rpm` is present;
- `/usr/bin/dpkg` is absent.

Fixes #37997
6 years ago
tranceitionalMynd 04e3c964fb Added executable parameter to the script module (#36969)
* Added interpreter parameter to the script module

* Let required and default parameters get documented implicitly for binary parameter

* Renamed interpreter parameter to executable
6 years ago
ossark 90aa68be41 Fixes #38484 (#38522)
* Fixes #38484

* Makes asn optional
6 years ago
Sloane Hertel 9d30434b6c
ec2_ami_facts: return images in a consistent order (#40679)
* ec2_ami_facts: return images in a consistent order
6 years ago
Yanis Guenane 496d10f7a8 Remove support for SSLv2 in test suite when not defined. (#39183)
When running the test test/units/module_utils/urls/test_open_url.py
test_open_url_no_validate_certs, the test fails because of the SSLv2
check.

Test is run on a machine using openssl 1.1.0g. By reading the openssl
man page[1], one can see that support for SSLv2 has been removed.

> Support for SSLv2 and the corresponding SSLv2_method(),
> SSLv2_server_method() and SSLv2_client_method() functions where removed
> in OpenSSL 1.1.0.
>
> SSLv23_method(), SSLv23_server_method() and SSLv23_client_method() were
> deprecated and the preferred TLS_method(), TLS_server_method() and
> TLS_client_method() functions were introduced in OpenSSL 1.1.0.

Hence this commit remove the uses of this flag when it is not defined.

[1] https://www.openssl.org/docs/man1.1.0/ssl/SSLv23_method.html
6 years ago
Aleks bc2430694c Add a note for multible changes in one file (#37090)
As mentioned in this answer https://stackoverflow.com/a/41549694/6778826 we was able to solve a bad behaviour of `blockinfile` module.
We must change two parts in one file which we have done in two tasks. Every run have rewriten the first block with the second block in the wrong position. **After** we have set the `marker` in the second task to another value was the `blockinfile` module able to insert both parts in the right position in the same file.
6 years ago
Jesse Pretorius 1579178f2d os_project_access: clean up some things (#40464)
* os_project_access: correct example tasks

The example task does not work. Fix it so that it does.

* os_project_access: Remove unused function

The _get_allowed_projects function is not used anywhere,
so we can remove it and be free of nova_client for this
module.
6 years ago
Jesse Pretorius f53a29f392 os_server: Remove nova_client usage (#40462)
The os_server module uses the deprecated nova_client function, and
therefore ends up requiring python-novaclient installed. In this
patch we switch the ip detachment to make use of a shade function,
removing the need for python-novaclient.
6 years ago
Rob 38c13259b3 [AWS] New module: aws_glue_job (#39493)
* New module - glue_job

* Review fixes
6 years ago
Rob 1b45a755a2 [AWS] Add helpful failure message when using wrong lb module (#40433)
Remove the default empty dict parameter for tags.
6 years ago
Moritz Grimm f16ec4e64c [AWS] Add check for empty values in elasticache module - fixes #40063 (#40454) 6 years ago
Strahinja Kustudic de57fa71c1 Improve timezone module for none systemd Linux distributions (#38032)
* The module now correctly sets the timezone in both the config file and
in /etc/localtime; while hwclock is set in both the config and
/etc/adjtime.
* Module checks if the timezone is actually set by checking
/etc/localtime. Before it only checked if it was set in the config file.
* Fixed module not setting the timezone on RedHat systems if
/etc/localtime was a symbolic link.
* Fixed module failures in case of missing config files or incorrect data
in them.
* Added a lot of integrations tests to cover most of these situations.
6 years ago
james-jra 4a6161bab8 Create a new pipe for sshpass on final retry. Fixes #32238 (#39294) 6 years ago
Felix Schmidt b7b19d139e Add start and end timestamp to task and play result in json callback (#39277)
* Add start and end timestamp to task result in json callback

Currently, the timestamp information is only provided directly by a few
Ansible modules (e.g. the command module, which shows the runtime of a
command per host result).
This change adds an 'overall' time information to all executed tasks. The
delta between both timestamps shows how long it took a task to finish
across all hosts/nodes.

This patch is also proposed for zuul and can be found here:
https://review.openstack.org/#/c/563888

* Add missing timezone information to 'start' and 'end' timestamps

As the datetime.isoformat() function is missing the timezone information,
we assume it's local time.

* Nest 'start' and 'end' timestamps in 'duration' field.

To clarify the purpose of those fields.

* Add 'start' and 'end' timestamps also for plays
6 years ago
Antoine Pietri 313a46744d Add a 'machinectl shell' become_method (#39826)
* Add a 'machinectl shell' become_method

* docs: add explanations for the machinectl become_method

* docs: machinectl become_method: specify this part is specific to Linux+systemd setups
6 years ago
Tim Rupp 174d7f8ea2
Fixes an incorrect method definition (#40719)
The to_return method def in bigiq's https offload module was incorrect.
This fixes it.
6 years ago
provonet 33e1453d5a support url scheme (#39683) 6 years ago
tgates81 f65df5f62a yum.py module: added option for yum --bugfix updates. (#36203) 6 years ago
Alex Stephen 362e622a4b New module: GCP Compute Disks (#38612) 6 years ago
René Moser 5dd3aa26ea
cs_instance: implement host migration support (#40309)
* cs_instance: implement host migration support

* fix build

* fail fast on update if user is not admin

* improve tests a bit

* expunge it

* fix typo

* disable temporarly verify for host on starting instance.
6 years ago
René Moser 6443a56069
cloudstack: vpn: compatiblity fix for 4.5 API (#40700) 6 years ago
Jiri Tyr e6e5e45d7e Fixing choices for transport option in gluster_volume module (#38815) 6 years ago
Felix Fontein aa791e51c7 Allowing to prohibit account changes for acme_certificate. (#40698) 6 years ago
Felix Fontein e294426b07 Rename letsencrypt module utils / document fragment to acme. (#40697) 6 years ago
Adrián López 4188c5986b cyberarkpassword: Display.vvvv expects a string (#40335)
'terms' is a list and display.vvvv is especting a string.
6 years ago
Milan Ilic 14f0fd9ab3 Add mode, owner_id and group_id options to one_vm (#40217)
Add `mode` option which sets permission mode of a VM in octet format
Add `owner_id` and `group_id` which set the ownership of a VM
Move the waiting for state at the end of the module, so it could fail faster if there is some error
tagged_instances will only be returned only if count_attributes and/or count_labels are used, as specified in the documentation
Update relevant tests
Add tests for mode, owner_id, group_id
6 years ago
Felix Fontein dec392793b Letsencrypt: add account management module (#37275)
* Removed superfluous space.

* Separating account init code from ACMEAccount constructor.

* Extracted module utils and docs fragment.

* Added new letsencrypt_account module.

* Ignore pre-1.0.0 versions of OpenSSL.

* Added account key rollover.

* Renaming letsencrypt_account -> acme_account

* Simplifying check for updating contact information.

* Rewriting docstring for ACMEDirectory.

* Changing license according to permissions given by individual authors in https://github.com/ansible/ansible/pull/37275.

* Updating BOTMETA.

* Preparing for change of ACME protocol currently discussed in ietf-wg-acme/acme.

* Updating documentation.
6 years ago
Felix Fontein 2fc23fdc18 Prevent Jinja2 string escaping in alternative Route53 example from getting lost in translation. (#40376) 6 years ago
René Moser e7709e169a
new module cloud_init_data_facts (#37932)
* add new module cloud_init_facts

* rename cloud-init facts

* simplify

* re-add tests

* make test run on ubuntu except 14.04
6 years ago
Rafael c49b7d2a5d Fix opennebula test stub (#40436)
* Requesting fixture services from PYONE via environment varaibles

* moved all test functionality out of opennebula module utils
6 years ago
Alexey Elymanov c464419286 Add TrueOS as FreeBSD distribution (#37371) 6 years ago
Adam Mizerski 749e67fdf8 update docs of template module (#40312)
default value of 'trim_blocks' is 'yes'

+label: docsite_pr
6 years ago
Peter Janes 67493ebdee Add a 'releasever' parameter for dnf. Fixes #33314. (#37493)
* Add a 'releasever' parameter for dnf. #33314

* Set a default value for releasever

* Fix a variable name typo
6 years ago
Adrian Likins 1613a739ad fix decrypted vault utf8 values (#37539)
* Fix errors decrypted non-ascii vault vars

AnsibleVaultEncryptedUnicode was just using b"".decode()
instead of to_text() on the bytestrings returned from
vault.decrypt() and could cause errors on python2
if non-ascii since decode() defaults to ascii.
Use to_text() to default to decoding utf-8.

add intg and unit tests for value of vaulted vars
being non-ascii utf8

based on https://github.com/ansible/ansible/issues/37258

Fixes #37258

* yamllint fixups
6 years ago
siran b43a1a9f9f Update lineinfile.py (#38444)
`line` is a parameter. just making it explicit.
6 years ago
Ikuze 56937e8972 Fix problems with virtualbox inventory and composed vars and groups (#37498) 6 years ago
Matt Clay 826c6f8ec0 Remove execute bit from subversion module. 6 years ago
Jordan Borean 0df6b085c0
win_scheduled_task fix doc example with datestamp (#40691) 6 years ago
Simon d95c572992 New Memset module to request DNS reloads (#40390) 6 years ago
Simon 08f670864a New Memset module to manage DNS zone domains (#40391) 6 years ago
Rob Emery be8559bfa9 Subversion: checking out with existing content (#38366)
* Subversion: If the directory exists, we want the ability to checkout into it
and use the content as existing files; equivalent to svn checkout --force

I was expecting the force option to do this, however I understand why it
doesn't do that currently. I was debating with changing the meaning of force
to include this behaviour, however I've opted for a seperate flag for now
for backwards compatibility.

* Subversion: Sanity tests have failed suggesting this is the correct value

https://app.shippable.com/github/ansible/ansible/runs/60302/1/console
6 years ago
rhorer 2f5f57a78f Update net_banner.py (#40678)
Correct a typo in the DOCUMENTATION section.
6 years ago
Sachidananda Urs 0211fb7a78 gluster_volume: Fix `volume set' and `quota' features (#40438) (#40644)
* Add documentation for setting multiple options.
* Do not set `cluster' to myhostname, if cluster is not set. This will cause
  parse error, since module will try to parse the brick and hosts.
* Also fixes issue #40410
6 years ago
Rob 858f0fc000 New module: AWS Network load balancer (#33808)
* New module - elb_network_lb

* Fix creating a load balancer without tags

* Linter

Fix purging tags

Remove extra imports

* add support for cross zone lb, doc update and fix tagging

* pep8 fixes

* Add integration tests for elb_network_lb module

* more pep8

* Remove non-applicable option for NLBs

* fix target protocol

* pep8
6 years ago
Sijis Aviles 529ef6446e fix: Ensure zip excluded files are not checked (#40120)
* fix: Ensure zip excluded files are not checked

Fixes #26279

* test: Verify unarchive excludes behaves as expected

* fix: Typos and whitespaces
6 years ago
Carl Niger 8414230266 py2/py3 compat fix (#40614) 6 years ago
Sachidananda Urs 5861d5f74e gluster_peer: Module to create/dismantle trusted storage pool (#37771)
* gluster_peer: Module to create/dismantle trusted storage pool

* gluster_peer: Module to create/dismantle trusted storage pool

Added __init__.py and added function main() in the module.

* gluster_peer: Module to create/dismantle trusted storage pool

Empty __init__.py was needed. Removed comment from the file.

* gluster_peer: Module to create/dismantle trusted storage pool

Addressed review comments.

* gluster_peer: Module to create/dismantle trusted storage pool

Do version check more sanely, improve parameter handling.

* gluster_peer: Module to create/dismantle trusted storage pool

Use isinstance for type comparison.

* gluster_peer: Module to create/dismantle trusted storage pool

Use type=list for nodes parameter, get rid of literal_eval.

* gluster_peer: Module to create/dismantle trusted storage pool

Add parameter check_mode, had missed this somewhere in between.

* gluster_peer: do not set `force' in case of state=present

* gluster_peer: Fix typo in the documentation

* gluster_peer: make peer probe idempotent

* gluster_peer: Fix a logical error while evaluating booleans

* gluster_peer: set locale to C, pass list to run_command
6 years ago
Chris Archibald 9f732d2f05 last set of modules (#40493)
* last set of modules

* fix import issues

* fix issues

* fixes

* Review fixes

* review  changes
6 years ago
Chris Archibald cb0f0cb67f six set of modules (#40492)
* six set of modules

* fix issues

* fix issues

* Review fixes

* review fixes
6 years ago
Chris Archibald 7d551bba21 fifth set of modules (#40491)
* fifth set of modules

* fix issues

* Fixes

* fix choices

* fix snapshot

* spelling

* review fixes'
6 years ago
Chris Archibald 3bae9ed00c Commit first set of 5 netapp modules (#40486)
* Commit first set of 5 netapp modules

* Documentation changes

* Fix module

* move future

* fix issues

* fix aggregate

* fix issues matt found

* fix redundant requires

* fix issues

* documentation change
6 years ago
Chris Archibald da578b8fff fourth set of modules (#40490)
* fourth set of modules

* fix issues

* fix issues

* changes for review

* make changes to vlan
6 years ago
Chris Archibald ca7490b61b third set of netapp modules (#40488)
* thrid set of netapp modules

* fix issues

* fix issues

* fixed cmp issues

* fix 2 spaces

* fixes

* Change to documentation

* fixes
6 years ago
Ryan Brown 046561bbb0 Split AWS Config modules (#40111)
* Adding module for AWS Config service

* adding integration tests

* Split resource types into their own modules

* Properly use resource_prefix and retry on IAM "eventual consistency"

* Add config aggregator module

* AWS config aggregator integration test fixes

* AWS config recorder module

* Config aggregation auth rule

* Use resource_prefix in IAM role name

* Disable config tests
6 years ago
Sloane Hertel a90342ac33 ec2_vpc_net: fix hanging waiter when using host bits in a CIDR block (#40622)
* ec2_vpc_net: fix hanging waiter when using hostbits in a CIDR block

* remove extra line
6 years ago
Chris Archibald 5bfbe85a26 seconds set of netapp modules (#40487)
* seconds set of netapp modules

* fixes

* Fix issues

* Fix future issues

* fix issues

* Fix issues

* changes

* Change force

* made fixes

* add new line to end of file
6 years ago
Alex Stephen dc31809d2a GCP Inventory Plugin (#36884)
* Inventory

* Adding multi project support

* Adding multi project support

* Fixing PR comments and cleaning code

* Adding cache support
* Changed filter notation

* Inventory changes

* Better readability for zones, networks, subnetworks
* Added project to inventory output
* Using IP instead of hostname
* Keyed_groups support
* Use all zones when none provided.

* PR changes

* Doc changes
* Accepts *gcp_compute.yaml file names
* Added support for changing host naming precedent

* PR changes round 2

* Cache changes
* Changed verify_file function
* Misc style changes

* Cache fixes

* Fix docs for `hostnames` option.
6 years ago
Sloane Hertel cba64f5869 Fix inventory plugin cache + add tests (#38229)
* Fix setting the cache when refresh_cache or --flush-cache are used

* Use jsonify function that handles datetime objects in jsonfile cache plugin

* Don't access self._options directly

* Add initial integration tests for aws_ec2 inventory plugin

* Add CI alias

* Fix and add a few more unit tests

* Add integration tests for constructed

* Fix typo

* Use inventory config templates

* Collect all instances that are not terminated by default

* Create separate playbook for setting up the VPC, subnet, security group, and finding an image for the host

Create a separate playbook for removing the resources

* Allow easier grouping by region and add an example

* use a unified json encode/decode that can handle unsafe and vault
6 years ago
Nathaniel Case 0ad4b7b785
Fixes to httpapi for EAPI (#40675)
* Replace errant uses of str

* Hook up become to eapi

* Hook become up to nxapi, too
6 years ago
Suzuki Shunsuke 38c86b7eef Add 'init' option to docker_container module to support docker's `--init` option (#34547)
* Add support for `--init` option to `docker_container` module

Fixes #30761

* Validate docker API's version when docker_container's init option is True

https://github.com/ansible/ansible/pull/34547#pullrequestreview-122355244
https://docs.docker.com/engine/reference/commandline/run/#options

init option requires docker API 1.25+ .

* Fix failure of sanity test
6 years ago
James Mighion d9533c3cbf Adding changed option to save_when (#40640)
* Adding changed option to save_when

* Fixing version when changed was added.
6 years ago
Ryan Brown 858a1b09bb EC2_group module refactor (formerly pr/37255) (#38678)
* Refactor ec2_group

Replace nested for loops with list comprehensions

Purge rules before adding new ones in case sg has maximum permitted rules

* Add check mode tests for ec2_group

* add tests

* Remove dead code

* Fix integration test assertions for old boto versions

* Add waiter for security group that is autocreated

* Add support for in-account group rules

* Add common util to get AWS account ID

Fixes #31383

* Fix protocol number and add separate tests for egress rule handling

* Return egress rule treatment to be backwards compatible

* Remove functions that were obsoleted by `Rule` namedtuple

* IP tests

* Move description updates to a function

* Fix string formatting missing index

* Add tests for auto-creation of the same group in quick succession

* Resolve use of brand-new group in a rule without a description

* Clean up duplicated get-security-group function

* Add reverse cleanup in case of dependency issues

* Add crossaccount ELB group support

* Deal with non-STS calls to account API

* Add filtering of owner IDs that match the current account
6 years ago
Rob 49f569d915 New module: AWS Glue connection (#39492)
* New module = AWS Glue connection

* Add a few initial integration tests

* Add alias for CI

* module rename

* finish module rename

* add loop when getting glue connection again so we dont get None

* Limit number of retries to get new glue connection info
6 years ago
Dag Wieers ba4680c141
ACI: Make lag_type a required parameter for queries (#40657)
Without this change, the module will simply fail with an error when
doing a query and not specifying the **lag_type** parameter.

The integration tests expect **lag_type** too, so this simply codifies
what was expected since inception.
6 years ago
Sam Doran 8b4e36e711 Insert set commands if a delete command is entered (#40666) 6 years ago
Trishna Guha c2f7f36fc5
nxos_file_copy network_cli and httpapi fix (#40592)
* Leverage action plugin to pass credentials to nxos_file_copy for network_cli, httpapi

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* update integration test

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* make sure local test uses provider

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* update tests

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* update doc

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* clarify action plugin comment

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* Add connection=local back to nxos_file_copy because that module is weird

Also blacklist it running on nxapi, because that is meaningless

* remove provider

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* blacklist nxapi

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* Address review comment

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
6 years ago
saydamir 8666c08327 ec2_instance - fix instance creation with IPv6 (#40334)
IPv6 addresses and IPv6 address count may not be specified on the same request https://docs.aws.amazon.com/cli/latest/reference/ec2/assign-ipv6-addresses.html#options
6 years ago
Peter Sprygada d829ff6993 fixes bug with matching nxos prompts (#40655)
This change addresses an issue where the prompt matching regular
expressions would not match a prompt if the hostname starts with a
numeric value.  Before this change, the connection would fail with a
socket.timeout() error.  This change updates the termnal_stdout_re
values to now check for a number.

See Github issue #38639
6 years ago
Dag Wieers d7419b4dbc Do not silently skip YAML groups (#40660) 6 years ago
Nathaniel Case c04d0ebc23
Connection-side, the expection is AnsibleConnectionFailure (#40658) 6 years ago
Dag Wieers 9e2a59885e
aci_rest: Ensure we always return a status 6 years ago
Dag Wieers 05374da9b8
ACI: Add from_card and to_card parameters (#40653)
* ACI: Add from_card and to_card parameters

* Add version info to new parameters
6 years ago
Milan Ilic 18e7d814ef Add OpenNebula one_service module (#37829) 6 years ago
Petr Balogh f224afde49 Add auth key for OpenStack Volume Provider (#40294)
* Add auth key for OpenStack Volume Provider

For adding OpenStack Volume Provider we need to also add auth key,
value, for Ceph. This patch allows to add/update/remove auth keys.

Also fixing the issue for attach cinder SD to the datacenter.

* Fixing documentation

* Small fixes in ovirt_external_provider module.

Fixed doc for param and small changes.

* Fix comments from review.

Adds conditions for check mode.

* Move update auth key method in the module

* Remove empty line which pep8 complains about
6 years ago
Ondra Machacek 143bcee962 ovirt_cluster: Add custom scheduling_policy_properties parameter (#40588) 6 years ago
wiso 160bf82544 Add NETCONF support for SROS devices (#40330)
* added NETCONF support for SROS devices

* corrected alu mapping

* fix pep8 in sros.py

* BOT META file updated
6 years ago
wiso 387a23c3d1 New ansible module netconf_rpc (#40358)
* New ansible module netconf_rpc

* add integration test for module netconf_rpc

* pep8/meta-data corrections

* usage of jxmlease for all XML processing
separation of attributes "rpc" and "content"

* removed unused imports
improved error handling

* fixed pep8

* usage of ast.literal_eval instead of eval
added description to SROS integration test for cases commented out
6 years ago
Deepak Agrawal ea4a78b2a1
iosxr_command does not work with prompt and answer arguments (#40475)
* mismatch type between function arguments

* add testcase for prompt

* yamllint issues

* remove overwriting response in case of connectionError exception

* remove import of ConnectionError as it is not required
6 years ago
Yoan Blanc 3e2a4ee8ba cloudstack: cs_instance with details (#40214)
Signed-off-by: Yoan Blanc <yoan.blanc@exoscale.ch>
6 years ago
Yuwei Zhou c95724fb0a Fixes some NIC problems: create without nsg, support loadbalancer (#38643)
* add loadbalancer

* dict check nullable

* add default vallue when get list

* create backend addr pool

* fix the set

* fix to dict

* fix ideponement

* use param security group name when create

* nic can has no nsg

* add test

* fix

* fix

* fix

* add document

* add configuration

* fix

* fix

* remove all resources

* fix

* fix test

* add version added

* fix lint

* fix lint

* Fixes some NIC bugs (#39213)

* add loadbalancer

* dict check nullable

* add default vallue when get list

* create backend addr pool

* fix the set

* fix to dict

* fix ideponement

* use param security group name when create

* nic can has no nsg

* add test

* fix

* fix

* fix

* fix idemponet

* add document

* fix test

* add configuration

* fix

* fix

* remove all resources

* fix

* fix test

* add version added

* fix lint

* fix lint

* fix lint

* remove new feature and only submit bugfix

* remove useless test

* fix

* fix indent

* Update azure_rm_networkinterface.py

* fix comment

* support 3 types to specific name and resource group

* avoid test racing

* fix test

* add sample

* add resource id test
6 years ago
Gyorgy Nadaban 4fbdc1a497 Fixed WebRequest init (#40641) 6 years ago
Dag Wieers d04a989bd2 nxos_interface: Disable switchport for loopback/svi (#40314)
* nxos_interface: Disable switchport for loopback/svi

* Replace interface_type with get_interface_type(name)
6 years ago
flowerysong d4b2252d8b zfs: fix broken parameter handling (#36685)
* zfs: Fix handling of parameters passed via check_invalid_arguments

cc7a5228 had a typo, so the merged set of arguments was shoved into the
wrong parameter and ignored.

`origin` is an actual module parameter and should be processed like one.

pop()ing makes debug output misleading.

* zfs: fix command generation for `zfs snapshot`

Creating a snapshot and supplying an origin are mutually exclusive,
but were not treated as such. We should throw an error instead of
running an invalid command (`zfs snapshot origin foo@snapname`.)
6 years ago
Brian Coca 5852df57f4 allow dataloader to use descriptors (#40627)
also fixed improper uses of str()

fixes #40383
6 years ago
Benoit Dunand-Laisin 3d6828949e Fixes #24241 Module always updates installed plugins (#40591)
* Update jenkins_plugin.py

When setting state=latest, plugin are always updated because plugin_data['sha1'] contains trailing '\r\n' (so it always detecting a sha1 change)

+label: docsite_pr

* rstrip wasn't the solution but to_bytes is
6 years ago
Alfredo Deza 2d0891e089 facts: remove duplicate device vendor and model assignment (#39419)
Signed-off-by: Alfredo Deza <adeza@redhat.com>
6 years ago
Andrew Widdersheim 8d1f2ba9d9 yum: Propagate plugins to all parts of the module (#40085)
In `2.5` (d1b63bd5), the `yum` module received the capability to disable
and enable specific plugins. However, these changes only applied to
certain parts of the logic. This change propagates those changes to the
rest of the module, specifically those using the `yum` API.
6 years ago
Martin Krizek 0eece38cdf Fix any_errors_fatal in meta tasks (#36870) 6 years ago