Commit Graph

17697 Commits (f5f2a2fac2b251ead20192cc46c719b33ee4bbad)

Author SHA1 Message Date
Jacob McGill 79afb2eff1 new module: manage Bridge Domains [network/aci/aci_bridge_domain] (#28196)
* ACI Bridge Domain: Add new module

* fix type in docstring

* fix type in docstring
7 years ago
Dag Wieers 68d487eacf new module: Manage route tag policies [network/aci/aci_route_tag_policy] (#28204)
Manage route tag policies on Cisco ACI fabrics.
This module is idempotent, and supports check-mode and has diff-support.
7 years ago
Dag Wieers fdfb4f736d new module: manage LLDP interface policies [network/aci/aci_lldp_policy] (#28099)
* aci_lldp_interface_policy: Manage LLDP interface policies

Module to manage LLDP interface policies on Cisco ACI fabrics.
This module is idempotent, and supports check-mode and has diff-support.

* Rename aci_lldp_interface_policy to aci_lldp_policy
7 years ago
Jacob McGill 5e24fb298e Enhance module_utils to be cleaner and support more modules (#28197) 7 years ago
Dag Wieers 5a887fb1f6 aci_port_channel: Manage port channel interface policies (#28141)
Manage port channel interface policies on Cisco ACI fabrics.
This module is idempotent, and supports check-mode and has diff-support.
7 years ago
Dag Wieers af39ed86e5 aci_span_dst_group: Manage span destination groups (#28143)
Manage span destination groups on Cisco ACI fabrics.
This module is idempotent, and supports check-mode and has diff-support.
7 years ago
Dag Wieers 9b05195a04 aci_taboo_contract: Manage taboo contracts (#28144)
Manage taboo contracts on Cisco ACI fabrics.
This module is idempotent, and supports check-mode and has diff-support.
7 years ago
Dag Wieers 42d8a9ea89 aci_port_security: Manage port security (#28142)
Manage port security on Cisco ACI fabrics.
This module is idempotent, and supports check-mode and has diff-support.
7 years ago
Dag Wieers f7244ebb49 aci_monitoring_policy: Manage monitoring policies (#28140)
Manage monitoring policies on Cisco ACI fabrics.
This module is idempotent, and supports check-mode and has diff-support.
7 years ago
Dag Wieers ec8b99ac06 aci_action_rule_profile: Manage action rule profiles (#28139)
Manage action rule profiles on Cisco ACI fabrics.
This module is idempotent, and supports check-mode and has diff-support.
7 years ago
Dag Wieers 67111e7fec aci_fc_policy: Manage FC interfaces on Cisco ACI fabrics (#28095)
Module to manage FC interfaces on Cisco ACI fabrics.
This module is idempotent, and supports check-mode and has diff-support.
7 years ago
Dag Wieers 4e3c3a1aa1 aci_filter: Manage filter objs on ACI fabrics (#28094)
Module to manage top level filter objects on Cisco ACI fabrics.
This module is idempotent, and supports check-mode and has diff-support.
7 years ago
Dag Wieers d4fae9bbbc aci_contract: Manage contracts on ACI fabrics (#28093)
Module to manage contracts on ACI fabrics.
This module is idempotent, and supports check-mode and has diff-support.
7 years ago
3onyc 554496c404 [passwordstore] Use builtin _random_password function instead of pwgen (#25843)
* [password] _random_password -> random_password and moved to util/encrypt.py
* [passwordstore] Use built-in random_password instead of pwgen utility
* [passwordstore] Add integration tests
7 years ago
Dag Wieers f345ba5c38 More maintainers is a good thing, right ? 7 years ago
Evan Kaufman 767be93f77 Replace - Clarified regex docs (#26727)
* Clarified docs regarding multiline mode and negated character sets

Refs #26712

* Escaped newline
7 years ago
René Moser 13dec9259f galaxy-cli: selective install roles in requirements file (#21412)
* galaxy-cli: force install selected roles in requirements file

* only when requirements file but also handle uninstalled roles
7 years ago
Brian Coca d95fd7414a use proper booleans for vars_prompt 7 years ago
Sam Doran 68060002e8 Rename modules from plural to singular (#27185)
* First batch of modules renamed from plural to singular

Related to this proposal: https://github.com/ansible/proposals/issues/10

* Emit rename deprication warning

* Update legacy-files.txt and skip.txt to reflect new names
7 years ago
saichint 9d84a4e530 fix for nxos_ospf_vrf invalid cmd and ntp errors (#27977)
* fix for nxos_ospf_vrf invalid cmd

* fix for nxos_ntp issues
7 years ago
Nathaniel Case 19a6000d97 Fix nxos_bgp_af networks parameter (#28169)
* Split 'networks' and 'redistribute' in get_value

* Add missing `'` in docs
7 years ago
Jacob McGill 59f704c766 add module to support ACI Contexts (#28091) 7 years ago
Ganesh Nalawade c9b2869f06 Add regex to retrieve socket path (#28181) 7 years ago
Toshio Kuratomi 47b534d809 Move more modules out of curated
pip to core because users frequently use pip to install packages to run
ansible modules.

win_chocolatey to community as it still needs some work before we'd be
ready to include it in core support.
7 years ago
Abhijeet Kasurde 09cabaf702 Use response.content instead of response object (#25772)
vca module utility uses response object instead of
response.content which raises exception in while fail_json
call. Use content attribute from response object instead which
is exact description of HTTP Response error.

Fixes #25378

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
7 years ago
Abhijeet Kasurde 8b7a58c961 Remove redundant get_obj method (#26819)
Fix removes redundant get_obj method in favor of
find_datacenter_by_name API. Also, strict checking for
datacenter object.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
7 years ago
rahushen b74300b657 Additional fix for #27167: port-channel interface idempotence (#27979) 7 years ago
giovannisciortino d3e48a51f5 Add check mode support to ansible-pull (#28021)
Fixes #27989
7 years ago
Toshio Kuratomi 3edac559d3 the smart transport is broken by ssh retry code
1fe67f9 introduced retries to the ssh connection put file and fetch
file.  Unfortunately, that change broke the smart transport because it
started raising exceptions instead of returning from _run().  This
breakage is documented in #23711.

An attempt to fix it was made at #23717 but the first attempt was
objected to as needing to touch too much code.  The second attmept was
objected to as smart was forced to encapsulate retries (thus retrying
a sftp "rety" times before trying scp "retry" times and then finally
moving onto piped).  This third attempt has retries encapsulate smart.
So each sub-transport is tried once and if all three fail, another retry
attempt is made which tries each of the three again.

Fixes #23711
Fixes #23717
7 years ago
Giovanni Sciortino ab81c6c0f3 strategy: lost list order using with_items during displaying results Fixes #21008 7 years ago
Nathaniel Case 820d7e805a Streamline nxos_smu (#28030) 7 years ago
rahushen b9c3329950 nxos_ip_interface: Fixes for #27170, #27172 (#27935)
* Fixes for #27170, #27172

* Add nxos_ip_interface IT tests

* For ipv6 check if ip address configured before doing a no ip address
7 years ago
Arne Demmers 000df2709d Support downgrade to specific version in yum module. 7 years ago
David Newswanger cfda267b2b fixes pipe issue (#28127) 7 years ago
Trishna Guha 60ce6438e3 fix nxos_overlay_global idempotence (#28150)
* fix nxos_overlay_global idempotence

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

* modify nxos_overlay_global unittest

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
7 years ago
David Newswanger a01aa6e9df Fix structured output not supported in nxos_pim_interface (#28125)
* fixed unstructured error

* fix unit tests so they accept commands in dictionary form
7 years ago
Trishna Guha 12460dd713 Add ios_vrf declarative intent config check (#28001)
* Add ios_vrf declarative intent config check

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

* add version for delay param

* modify ios_vrf unit test
7 years ago
Ganesh Nalawade eb33cc88bd Add state intent argument in vyos interface (#28066)
* Add state intent argument in vyos interface

*  State intent argument support
*  Integration test for supported intent arguments

* Add intent testcase

* FIx ci issue
7 years ago
Ganesh Nalawade 711a6b2326 Add common aggregate arguments for junos modules (#28124)
If parameter value in aggregate is not set, fetch it's corresponding
value from top level parameters.
7 years ago
Rafał Osiecki 33e56ca496 typo fix (#27212) 7 years ago
Pierre-Louis Bonicoli e52096e78a copy: grammar fix 7 years ago
Pierre-Louis Bonicoli ed8279cce0 copy: fix YAML documentation format 7 years ago
Pierre-Louis Bonicoli 1f5c908370 copy: state behavior when dest is a nonexisting path 7 years ago
Pierre-Louis Bonicoli 16f2e47559 copy: use formatting options 7 years ago
Pierre-Louis Bonicoli 28eb9466c7 copy: document behavior related to dest creation 7 years ago
Ganesh Nalawade 21bd7bcbb0 junos_interface intent arguments (#27947)
* junos_interface intent arguments

*  Add check for intent argument in junos_interface
*  Integration test for intent arguments

* Minor type fixes

* Add delay only if config diff is present

* add enabled configuration argument

* net_interface test case changes

* Minor doc change
7 years ago
Marko Stanković 6e7cf7377b xml: Add example with namespaces and clarify note (#28113)
* xml: Add example with namespaces and clarify note

* Correct the line length
7 years ago
Toshio Kuratomi 394e1e350c Expand wildcard imports and add boilerplate
More amazon modules with no open PRs.
7 years ago
Pierre-Louis Bonicoli 4ecf85392e udm_user: fix broken import
Tested with:
from datetime import datetime, timedelta
from dateutil.relativedelta import relativedelta
n = datetime.now()
assert n + timedelta(days=365) == n + relativedelta(years=1)
7 years ago
Pierre-Louis Bonicoli c52f355bcb serverless: fix broken import 7 years ago
Pierre-Louis Bonicoli dbc422ea1c Fix 'module' object is not callable 7 years ago
Pierre-Louis Bonicoli f9404b0d85 Fix exit_json usage: really call client.auth.logout 7 years ago
Pierre-Louis Bonicoli b556def4d3 Update DOCUMENTATION metadata 7 years ago
Pierre-Louis Bonicoli ac05645bce Remove commented statements 7 years ago
Pierre-Louis Bonicoli f761fc1d1f rhn_channel: fix py3 compatibility (use six)
and remove unused import
7 years ago
Pierre-Louis Bonicoli 5f62a973da docker_secret: fix broken import 7 years ago
Pilou feff6abd72 os_client_config: fix broken import (#26839)
* os_client_config: fix broken import
* remove wildcards and add boilerplate
7 years ago
Nick Ward f52a022022 Python3 compatability for elb_application_lb and elb_target_group 7 years ago
Toshio Kuratomi 9a7e23569e Fix wildcard imports, remove get_exception, add boilerplate
Amazon modules that don't have open PRs against them
7 years ago
Toshio Kuratomi 7cd81b802d Fix wildcard imports, remove get_exception, add boilerplate
Fixed for monitoring modules
7 years ago
Sloane Hertel aca1950150 iam certificate facts (duplicate): add iam_cert_facts as alias for iam_server_certificate_facts (#25387)
* add iam_cert_facts as alias for iam_server_certificate_facts
* remove from legacy files
7 years ago
Artem Zinenko 6058cb736d rabbitmq_plugin for Windows (#28017)
* Fixes #28016: rabbitmq_plugin for Windows

* Disable documentation check for rabbitmq_plugin.ps1

* Renamed rabbitmq_plugin -> win_rabbitmq_plugin

* Fixed the documentation after review

* Fixed 'RETURN' section

* Fixed docs for original module

* Added dots to original module docs.
7 years ago
Toshio Kuratomi ac56a2f138 Remove wildcard imports and get_exception calls
Fixed module_utils
7 years ago
T. Miller 93e1caccb7 ini_file: Match tabs before options (#28102) 7 years ago
Peter Sprygada 5ee7862793 update telnet module (#28100)
* accepts list of prompts to expect
* updates doc strings
7 years ago
Brian Coca 40d29936a4 telnet action plugin (#27983)
* draft telnet action plugin

docs in module

* updated per feedback

* fixed imports

* pep8 fixes

* added meta import even though its useless
7 years ago
Toshio Kuratomi 039383d90f Fix symbolic mode usage in unarchive with zip files
Fixes #21090
7 years ago
Toshio Kuratomi a3132e5dd6 Optimize template (#28044)
* Optimize template

* In fixing template to handle diff correctly #24477, I introduced more
  round trips to the remote end which slowed things down  The new code now
  uses one fewer round trips than the old code.
* Reimplement a large part of template by calling the copy action plugin
  instead of doing it in template's code.  This reduces the code in
  template and gives us one place to fix bugs and optimize.
* Add a follow parameter to template that mirrors the follow parameters
  for file and copy.
* Fix copy's diff handling (probably broken in my rewrite for in 2.4
  development)
* Adjusted when copy creates tmp dirs to rduce round trips in copy and
  template.

Fixes #27956
7 years ago
Jacob McGill 8b92369678 Update aci_tenant to support check_mode (#28090) 7 years ago
Jacob McGill c04349088e update aci module util with methods to support check_mode and idempotency (#28089) 7 years ago
Jason Lingohr 3d29f79e74 Documentation fixes. (#28047)
* Documentation fixes.

* Update win_route.py
7 years ago
chriskarel 991918e9d2 Fix idempotency for Unix permissions in zip files. (#24580)
* Fix idempotency for Unix permissions in zip files.

This fix prevents the unarchive module from reporting 'changed' when a zipfile contains items with Unix permissions that differ from the system default.

* Update zip unarchive tests.

Additional tests for the unarchive module with zip files:
- Test file in zip archive with non-default permissions
- Test file added to zip archive with Windows permissions

* Additional fix for mixed win/unix archives.

  Turns out my original fix fails under some mixed archives, as setting the umask to zero can be applied to those files.  This creates a per-file umask variable, so a mix of permission types don't cause problems.

* CI Checks

CI checks for archives with:
* non default Unix permissions
* Windows permissions


* Workaround for BSD differences.

Using Zipinfo due to lack of support in BSD unzip.
Permissions handling is also different in BSD -- always applies UMASK to file permissions.

* Added checks for creating directories and SSH keys for existing users.
7 years ago
Sloane Hertel 3cb1c38ecc [cloud] Allow S3 module to correctly delete objects by groups of <= 1000 (#28068) 7 years ago
Brian Coca d89dd75769 validate include_role args (#28077)
* validate include_role args

* nicer error msg

* removed unused static

* updated as per feedback

* pepe ATE
7 years ago
Jacob McGill 21dbde0abe fix issue with trailing white space when logging into asa (#28073) 7 years ago
Trishna Guha aef4e3d8fa fix nxos_snapshot (#27993)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
7 years ago
Peter Sprygada 17a259a163 fixes command to be sent over nxapi for nxos_file_copy (#28029)
fixes #27347
7 years ago
Patrick Ogenstad 089226e372 Fixes for broken asa_config module (#27218)
* Fixes for broken asa_config module

* strip() prompt before checking
7 years ago
Sloane Hertel 40eb349ac6 [cloud] Make ec2_asg more resilient using AWSRetry around boto3 calls (#27598)
* Add AWSRetry to ec2_asg

* Paginate describing ASGs and launch configurations

pass connection to delete_asg

Fix a couple little bugs

* Use boto3's pagination build_full_result()
7 years ago
Thomas Stringer e4cd899363 Add support for Azure 2.0.0 (#27920)
* Adapt azure_rm_resource_group to azure 2.0.0 + azure Cli support

* Fix exceptions in Azure ARM plugins

* update azure_rm_networkinterface documention to reflect required params

* change state param to not required for docs in azure_rm_subnet

* fix import to reflect azure==2.0.0 changes

* add aliases and fix docs for azure_rm_storageblob

* add resource_group_name alias to azure_rm_storageaccount_facts

* fix import bug due to change in azure==2.0.0

* fix args bug and enum modules issue

* update docs to reflect azure==2.0.0

* pin management clients to a specific api_version

* update docs to reflect the new azure-ansible-base python package

* add fallback for older api resource group listing

* rework azure dependencies installation

* refactor path joining to a cross-plat solution
7 years ago
Michael Price 1b9d9376e2 Refactor E-Series Hosts module to use module_utils (#20893)
Refactor the NetApp E-Series module to utlize the common module_utils
and doc_fragments.
7 years ago
Brandon Schlueter 0e334ca821 Don't compare group_vars paths with bytestrings (#27922)
* Don't compare group_vars paths with bytestrings

* Compare spath with unicode string in VarsModule
7 years ago
Nathaniel Case 0464a21a85 Fix nxos_snmp_contact, others (#28000)
* Fix nxos_snmp_contact

Fixes #27714

* Fix nxos_snmp_community

Fixes #27711

* Fix nxos_install_os

Fixes #27604

* Update nxos_ntp_auth

Fixes #27521

* Fix nxos_igmp_snooping

Fixes #27501
7 years ago
Sloane Hertel 1de91a9aa0 [cloud] Convert `s3` module to use boto3 (#21529)
* replace boto with boto3 for the s3 module

make s3 pep8 and remove from legacy files

fix s3 unit tests

* fix indentation

* s3 module - if we can't create an MD5 sum return None and always upload file

* remove Location.DEFAULT which isn't used in boto3 and tidy up the docs

* pep8

* s3: remove default: null, empty aliases, and required: false from documentation

fix incorrectly documented defaults

* Porting s3 to boto3. Simplify some logic and remove unused imports

* Fix s3 module variables

* Fix a typo in s3 module and remove from pep8 legacy files

* s3: add pagination for listing objects.

Fix logic and use head_object instead of get_object for efficiency.

Fix typo in unit test.

* Fix pagination to maintain backwards compatibility.

Fix incorrect conditional.

Remove redundant variable assignment.

Fix s3 list_object pagination to return all pages

* Use the revised List Objects API as recommended.

* Wrap call to paginated_list in a try/except

Also remembered to allow marker/prefix/max_keys to modify what keys are listed

* Simplify argument
7 years ago
Michele Zuccala 7d1308b0d8 [cloud] ovirt: add headers param to auth (#27881)
* Add filter param to ovirt module auth

* Update docs to include new filter param

* Fix broken YAML

* Replace filter param with headers
7 years ago
giovannisciortino 49209bfcc5 blockinfile: add --diff support in check mode (#27997) 7 years ago
Rich Murphey 88ccaf106b use of multiple chocolatey package names (#28046)
* use of multiple chocolatey package names

It might be helpful to users, to clarify whether/when <name:> must specify a single package.

Users who are familiar with chocolatey may be accustomed to installing multiple packages in a single invocation of 'choco install'.

I believe win_chocolatey currently accepts multiple package names when state: is latest or present.
For instance, this appears to work currently:

  - win_chocolatey:
      name: >-
        pscx
        windirstat
      state: latest

However, when state: is absent, uninstall is not performed if multiple package are specified.
The chocolate.log output suggests that chocolatey is treating the multiple packages as an 'exact' name of a single package name:
2017-08-10 19:04:04,087 2424 [DEBUG] - Command line: "C:\ProgramData\chocolatey\choco.exe" list --local-only --exact pscx windirstat
2017-08-10 19:04:04,087 2424 [DEBUG] - Received arguments: list --local-only --exact pscx windirstat

I find the current behavior helpful in terms of accepting multiple package names, even if uninstall must be treated differently.
It might be helpful to show an example of how multiple uninstalls can be handled by looping over them. 

  - win_chocolatey:
      name: "{{ item }}"
      state: absent
    with_items:
      - pscx
      - windirstat

* revise per Jordan Borean. remote colon (:) from text. revise formating.

* Update win_chocolatey.py
7 years ago
Nathan Hyde 241d38077f Use ChocolateyInstall env variable after installation (#27812)
* Use ChocolateyInstall env variable after installation

Fixes #19725 Custom install locations specified by the ChocolateyInstall
env variable in win_chocolatey

After an initial install of chocolatey, use the ChocolateyInstall
environment variable when assigning $script:executable .

* Improve process of locating "choco.exe" post-initial install

Implement feedback for locating choco:

* Check if choco.exe is in PATH, if there use this
* If not in path and ChocolateyInstall var is available, use that
* Otherwise, use the equivalent of Windows Special Folder CommonApplicationData for locating chocolatey.
  (Chocolatey install (v0.10.7) uses CommonApplicationData when ChocolateyInstall is not set.)
7 years ago
Dave 4cec83471c win_get_url.ps1 - enable TLS1.1/TLS1.2 if they're available but disabled (#26833) 7 years ago
Nick Chandler 22533c0932 New module: Add module or managing Windows Active Directory users (windows/win_domain_user) (#24075)
* Initial win_domain_user module support

* Add return information

* Update return values

* Add try/catch for PS module import

* Improve win_domain_user module

* Fix bad merge

* Fix pep8 failure

* Actually fix pep8 failure

* Update win_domain_user.py to meet standards

* Add check_mode support for win_domain_user

* Updated documentation before merge
7 years ago
Peter Sprygada edc3507c98 restore the ability to issue commands over junos cli (#28025)
* restore the ability to issue commands over junos cli

* add warn message for invalid arguments

* fix issue when checking if provider transport is set
7 years ago
Jordan Borean 5fbbf0e75a win_hotfix: new module to install Windows hotfixes (#27260)
* win_hotfix: new module to install Windows hotfixes

* revert to older module util loader style to satisfy the checks for now

* Changes from PR

* changed the test hotfix so we can run tests in shippable
7 years ago
Jordan Borean 44ed891290 win_mapped_drive: new module (#27020)
* win_mapped_drive: new module

* Rebased from upstream and updated copyright text
7 years ago
Jordan Borean e46adece48 win_user_right: add module with tests (#26276)
* win_user_right: add module with tests

* fixed up name of module in docs

* forgot the test module

* fixed up whitespace

* changes made to win_user_right based on feedback

* moved away from using secedit to Win32 with P/Invoke

* tidied up copyright for documentation
7 years ago
Ganesh Nalawade 3b0e9ded91 Fix fallback and boolean check in argspec (#27994)
Fixes #27978

*  Add missing assignment for param key in fallback handling
*  Add check for frozenset type
*  Unit testcase
7 years ago
Philip Gough fee42a01d9 Redhat subscription proxy support (#22544) 7 years ago
David Newswanger d0485779e8 nxos_smu: fix Structured output unsupported error in nxapi (#27976)
* fixed structured output unsupported error
7 years ago
Ricardo Carrillo Cruz e8f1c1511c Implement purge on eos_vrf (#28013) 7 years ago
Martin Krizek 1c4e491eac yum: do not hide yum's errors (#27696) 7 years ago
Rémi REY 7974ad34f1 add playbook runtime stat in the logstash callback stats (#25785) 7 years ago
Raphael Nestler ac0202fba1 win_file: Remove 'Create a file' example (#28009)
Fixes #28005
7 years ago
Peter Sprygada 145895dcf0 updates examples and documentation (#24211)
includes better examples of valid and invalid usage of the lines
argument

fixes #22828
7 years ago
Peter Sprygada d8b005ec65 updates the prompt regexp for prompt handling in sros (#28015)
* thanks to @jurajama for tracking this down and providing the fix
* fixes #24192
7 years ago
Brian Coca 2015835759 updated author with github id 7 years ago
Dag Wieers 8451d945aa Add new maintainer 7 years ago
Luke Armstrong fd18ade465 Documentation - modules/files/unarchive (#27998)
Last example is incorrect and will not run without throwing an error.
7 years ago
Juan Manuel Parrilla 2cfb30fc91 Fixes #24414, Added support for a ETCD folders (#24432) 7 years ago
Adrian Likins 220db9cdd2 Better vault pass prompt behav on EOF, more unit tests (#27981) 7 years ago
Adrian Likins 82f550e8cd Add prompt formats for 2.3 compat ask-vault-pass (#27974)
The prompt_formats dict didn't get the 'prompt_ask_vault_pass'
item added for interactive --ask-vault-pass, which
caused "KeyError: u'prompt_ask_vault_pass'"

Fixes #27885
7 years ago
Valentin Krasontovitsch cfff72e9db Use apt-get as fallback for apt upgrade
In answer to #2540, `aptitude` was introduced as tool of choice for running
upgrades in the apt module and installing new packages that arise as
dependencies during upgrades.

This recently lead to problems, as for example Ubuntu Xenial (16.04) ships
without aptitude (installed).

Studying the man pages of both apt-get and aptitude, it appears that we can
achieve the effects of `aptitude safe-upgrade` using

```
apt-get upgrade --with-new-pkgs --autoremove
```

while `aptitude full-upgrade` seems to be identical to `apt-get dist-upgrade`.

We use `apt-get` as described above as a fall-back in case that `aptitude`
cannot be found, issuing a warning when it does so.

Furthermore it introduces a flag `force_apt_get` which may be used to enforce
usage of apt-get (which does not issue a warning).

The integration tests are updated accordingly.

Cf. also the discussion in #27370.

Fixes #18987
7 years ago
Brian Coca 13d2eb6568 fix incorrect joingin of command for chpasswd
fixes #24638
7 years ago
Peter Sprygada c4da61239d stops trying to filter out commands from config (#28002)
* stops trying to filter out commands from config

fixes #24874

* fix up pep8 issues and remove offending function
7 years ago
Nathaniel Case ed8a5af3dc nxos_bgp: Fix idempotence for event-history (#27329)
* Fix idempotence for event-history

* `event-history detail` defaults to `False`, the rest to `size_small`
7 years ago
Lukas Bednar 29891bff19 ovirt_templates: fixed typo in doc (#27883) 7 years ago
Lukas Bednar a48a7eecc8 ovirt_templates: added option to name imported disk as a template (#27902)
* ovirt_templates: added option to name imported disk as a template

* ovirt_templates: added version_added to new attribute

* ovirt_templates: added alias for image_name and example

* added alias glance_image_disk_name for image_name
* example how to import image from glance as template
* improve description of template_image_disk_name
7 years ago
Abhijeet Kasurde f7321a87ca Pep8 fixes for rabbitmq modules (#24590)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
7 years ago
Ricardo Carrillo Cruz 7e2169f6d5 Add aggregate functionality to eos_vrf (#27915)
* Add aggregate functionality to eos_vrf

* Add tests for eos_vrf aggregate option

* Remove test2 and test3 vrfs at the beginning of the eos_vrf tests

* Pull all vrfs

With aggregate, we need to get all VRFs and we then compare with
desired VRFs, instead of assuming it will be just one.
7 years ago
Dag Wieers eee09565b1 utilities modules: PEP8 compliancy (#27741) 7 years ago
Simon Dodsley f30589c91d purefa_volume: Fix typo in required_if (#27921) 7 years ago
Marc Sensenich 38d026b1db New Module: Notification module for Office 365 Connector Cards (#27636)
* New Module: Notification module for Office 365 Connector Cards (notification/office_365_connector_card)

* Updates per review

* Added connection check when in check mode
7 years ago
Philippe Dellaert 920cd7bb1c New module: Waiting for VMware tools to become available (#27236)
* Adding VMware tools module
Functionality: Waits for VMware tools to become available (running
state)

* Adding base integration test preparations
Until govcsim supports actual guest tool status, the tests are disabled

* Cleanup and better getvm method

* Updating Changelog

* Adding required metaclass and future import

* Rename to vmware_guest_tools_wait

* Cleanup of documentation

* Fixing review remarks
7 years ago
giovannisciortino 064c3b837f Fixes #27836: get_url check if directory exists (#27852) 7 years ago
Dag Wieers 6bfedc9fe5 Various fixes (#27889)
This PR includes:
- Removal of get_exception (sadly)
- Avoid deprecating 'state' parameter with aci_rest
- Small fix for querying using aci_rest

Signed-off-by: @bcoca
7 years ago
mzizzi 380c43de4e cloudformation_facts: describe all stacks by default
* cloudformation_facts describe all stacks by default

* cloudformation_facts jittered backoff / retries

* cloudformation_facts stack_name use default arg_spec

* cloudformation_facts bugfix broken notification_arns output

* cloudformation_facts add simplified "stack_tags" output

* CloudFormationServiceManager.describe_stacks default args
7 years ago
Zac Medico 501fc7a248 template: fix KeyError: 'undefined variable: 0 (#27972)
* template: fix KeyError: 'undefined variable: 0

For compatibility with the Context.get_all() implementation
in jinja 2.9, make AnsibleJ2Vars implement collections.Mapping.
Also, make AnsibleJ2Template.newcontext() handle dict type
for the 'vars' parameter.

See: d67f0fd4cc
Fixes: https://github.com/ansible/ansible/issues/20494

* add units/template/test_vars

* intg tests for jinja-2.9 issues like 20494

test cases here are based on
https://github.com/ansible/ansible/issues/20494#issue-202108318
7 years ago
James Hogarth 7ec34b4cb2 ISSUE 25470 - update patch from review details 7 years ago
James fc274bda8a ISSUE 25470 - junit report failure on changes
This commit provides an environment option to change the behaviour so
that it's possible to declare any changes shoudl be considered a junit
failure.

This is useful when carrying out idempotent testing to ensure that
multiple runs are safe and any changes should be considered a test
failure.

In a CI test of an ansible role the practice would be to run the role
once without this to configure the test system, and tehn to run a second
time including this environment vairable so that the CI engine
processing the junit report recognise any changes to be a test fail.
7 years ago
David Moreau-Simard b35c749268 Add a sensu_client module
This provides a sensu_client module in order to be able to dynamically
configure a Sensu client.

It takes a different approach than the existing Sensu modules such as
sensu_check but is hopefully a much more flexible and simple way of
handling configurations.
7 years ago
David Moreau-Simard 7a56e5d45d Add sensu_handler Ansible module
This provides a sensu_handler module in order to be able to dynamically
configure a Sensu handler.
7 years ago
Kamil Cholewiński b5414088a3 Add ConfigMap support to kubernetes module (#21014) 7 years ago
Nathaniel Case a78f3faa6c nxos_bgp_neighbor_af does not want required_together (#26370)
* nxos_bgp_neighbor_af does not want required_together

* fixup tests

* Fix max_prefix_* issues

* Require address-family

* Fix idempotency for next_hop_third_party

* Fix idempotency for allowas_in*

* Fix idempotency for *_in and *_out

* Reorder command generation again

`default` is first, then `max-prefix`, then booleans
7 years ago
Peter Sprygada 4fb114174b fixes Traceback generated by nxos_igmp module (#27869)
* fixes Traceback generated by nxos_igmp module

* update module code to reflect review comments

* doh!...remove q
7 years ago
Colin Nolan db50650365 Adds support for all Consul 0.8 ACL rule scopes (#25800)
* Added in support for 'agent' and 'node' types.

* Tidies and moves `consul_acl` module closer to PEP8 compliance.

* Switched from using byspoke code to handle py2/3 string issues to using `to_text`.

* Made changes suggested by jrandall in https://github.com/ansible/ansible/pull/23467#pullrequestreview-34021967.

* Refactored consul_acl to support scopes with no pattern (and therefore a different HCL defintion).

* Corrects whitespace in Consul ACL HCL representation.

* Fixes Consul ACL to return the HCL equivalent JSON (according to the Consul docs) for the set ACLs.

* Repositioned import to align with Ansible standard (!= PEP8 standard).

* Adds Python 2.6 compatibility.

* Fixes PEP8 issues.

* Removes consul_acl.py as it now passes PEP8.

* Follows advice in the "Documenting Your Module" guide and moves imports up from the bottom.

* Tidies consul_acl module documentation.

* Updates link to guide about Consul ACLs.

* Removes new line spaces from error message string.

* Provide better error message if user forgets to associate a value to a Consul ACL rule.

* Minor refactoring of Consul ACL module.

* Fixes bug that was breaking idempotence in Consul ACL module.

* Detects redefinition of same rule.

* Adds test to check the Consul ACL module can set rules for all supported scopes.

* Fixes return when updating an ACL.

* Clean up of Consul ACL integration test file.

* Verify correct changes to existing Consul ACL rule.

* Adds tests for idempotence.

* Splits Consul ACL tests into cohesive modules.

* Adds test for deleting Consul ACLs.

* Test that Consul ACL module can set all rule scopes.

* Fixes issues surrounding the creation of ACLs.

Thanks for the comments by manos in https://github.com/ansible/ansible/pull/25800#issuecomment-310137889.

* Stops Consul ACL's name being "forgotten" if ACL updated by token.

* Fixes incorrect assignment when a Consul ACL is deleted.

* Fixes value of `changed` when Consul ACL is removed.

* Fixes tests for Consul ACL.

* Adds interal documentation.

* Refactors to separate update and create (also makes it possible to unit test this module).

* Improves documentation.

* Completes RETURN documentation for Consul ACL module.

* Fixes issue with equality checking for `None` in ACL Consul.

* Fixes Python 2 issue with making a decision based on `str` type.

* Fixes inequality check bug in Python 2.

* Adds tests for setting ACL with token.

* Adds support for creating an ACL with a given token.

* Outputs operation performed on Consul ACL when changed.

* Fixs issue with test for creating a Consul ACL with rules.

* Corrects property used to set ACL token in python-consul library.

* Fixes tear-down issue in test that creates a Consul ACL using a token.
7 years ago
Lucas Melchior 756b510414 fixed formatting for maven_artifact synopsis 7 years ago
Eduardo Suarez-Santana 9339b0f4a7 Fix lookup into search paths when undefined.
A fileglob may issue a warning `Unable to find xxxx in expected paths` when `ansible_search_path` is not defined, because it loops over the characters in the string instead of looping over a list of one element.
7 years ago
QijunPan 9e3ae8a0cb Delete unused module_utils/cloudengine.py (#25054)
* Delete unused cloudengine.py
rename cloudengine to ce.

* remove unused cloudengine.py
7 years ago
Willem van Ketwich 82765637b9 AWS EC2 ASG - Replace ELBs correctly and remove existing ELBs when specified as an empty list (#27830)
* fixes for edge cases - load_balancers has not been specified - don't want to delete existing elbs, wanted elbs aren't a superset of has_elbs (eg. 1 elb existing, adding another), specifying load_balancers: [] to delete existing elbs
7 years ago
saichint 14186af558 Fix for nxos_ospf idempotent issue (#27913) 7 years ago
Andrej Svenke ef55530d67 ecs_attribute: new module. (#20618)
ecs_attribute: fixed docs.

ecs_attribute: changed state to 'present' by default.

ecs_attribute: pep8 fix.

ecs_attribute: improved attribute iteration.

ecs_attribute: fixed absent EC2_REGION error message.

ecs_attribute: fixed exception handling on invalid attribute (e.g. 2+2).

ecs_attribute: pep8 fix.

ecs_attribute: docs and python3 fixes.

ecs_attribute: fixed class declaration for python 2-3 compatibility.
7 years ago
flowerysong e2b2ba6bc7 hashi_vault: fix token logic again (#27863)
The token is not mandatory, and there are more ways of setting it than
passing it in as a module arg.
7 years ago
Adrian Likins 767cd82e42 Fix module failure with pacemaker_cluster: state=cleanup (#27846)
* Fix module failure with pacemaker_cluster: state=cleanup

If state=cleanup was used, set_cluster() was being called
with 'cleanup' state which it doesn't handle. Instead
use existing clean_cluster() method.

Fixes #27799

* get and return cluster_state on state=clean as well
7 years ago
Anil Kumar Muraleedharan 52a8ed55ee Update cnos.py to remove unused method checkServerForImage (#27767) 7 years ago
Will Rouesnel 1685338603 get_url: Use atomic_move with get_url rather then shutil.copyfile
This brings get_url inline with the other internal file handling modules,
and allows replacement of in-use files.
7 years ago
Nathaniel Case 01dda25e0f fix nxapi transport in nxos_snmp_location (#27849)
* fix nxapi transport in nxos_snmp_location

* Appease Shippable
7 years ago
Nathaniel Case c1bf74283e Network load_config: Capture configuration output and display as warnings (#27851)
* Capture configuration output and display as warnings

* Don't break on nxapi

nxapi errors very loudly instead, so no need to muck about with warnings
7 years ago
Dag Wieers 2af759e9f9 vmware_vm_facts: Improve example and docs (#27898)
This fixes ansible/ansible-modules-extras#2475
7 years ago
schunduri 3241b7116e Cisco ACI New Module PR (#26836)
* New ACI Tenant module

*  New module requirements added.

* Placed from __future__ import to be the first line

* Interpreter line added
7 years ago
s-hertel 875c8e4f3e ensure stickiness expiration is an int before comparison 7 years ago
Ganesh Nalawade 1f7e04d958 Fix junos_lldp integration test failure (#27936) 7 years ago
Dag Wieers 6874ba23ff New module: Support manipulating XML files (#25323)
* Import original unmodified upstream version

This is another attempt to get the xml module upstream.
https://github.com/cmprescott/ansible-xml/

This is the original file from upstream,
without commit 1e7a3f6b6e2bc01aa9cebfd80ac5cd4555032774

* Add additional changes required for upstreaming

This PR includes the following changes:

- Clean up of DOCUMENTATION
- Rename "ensure" parameter to "state" parameter (kept alias)
- Added EXAMPLES
- Remove explicit type-case using str() for formatting
- Clean up AnsibleModule parameter handling
- Retained Python 2.4 compatibility
- PEP8 compliancy
- Various fixes as suggested by abadger during first review

This fixes cmprescott/ansible-xml#108

* Added original integration tests

There is some room for improvement wrt. idempotency and check-mode
testing.

* Some tests depend on lxml v3.0alpha1 or higher

We are now expecting lxml v2.3.0 or higher.
We skips tests if lxml is too old.

Plus small fix.

* Relicense to GPLv3+ header

All past contributors have agreed to relicense this module to GPLv2+, and GPLv3 specifically.

See: https://github.com/cmprescott/ansible-xml/issues/113

This fixes cmprescott/ansible-xml#73

* Fix small typo in integration tests

* Python 3 support

This PR also includes:
- Python 3 support
- Documentation fixes
- Check-mode fixes and improvements
- Bugfix in check-mode support
- Always return xmlstring, even if there's no change
- Check for lxml 2.3.0 or newer

* Add return values

* Various fixes after review
7 years ago
CyberArk BizDev 923445a484 CyberArk User Management (#27519)
* Initial submit for CyberArk User management module
7 years ago
Michael Price 760015fc6d Refactor E-Series Volume to use module_utils (#20901)
Refactor the NetApp E-Series module to utlize the common module_utils
and doc_fragments.
7 years ago
Adrian Likins c38ff3b8f8 pylint fixes for vault related code (#27721)
* rm unneeded parens following assert
* rm unused parse_vaulttext_envelope from yaml.constructor
* No longer need index/enumerate over vault_ids
* rm unnecessary else
* rm unused VaultCli.secrets
* rm unused vault_id arg on VaultAES.decrypt()

pylint: Unused argument 'vault_id'
pylint: Unused parse_vaulttext_envelope imported from ansible.parsing.vault
pylint: Unused variable 'index'
pylint: Unnecessary parens after 'assert' keyword
pylint: Unnecessary "else" after "return" (no-else-return)
pylint: Attribute 'editor' defined outside __init__

* use 'dummy' for unused variables instead of _

Based on pylint unused variable warnings.

Existing code use '_' for this, but that is old
and busted. The hot new thing is 'dummy'. It
is so fetch.

Except for where we get warnings for reusing
the 'dummy' var name inside of a list comprehension.

* Add super().__init__ call to PromptVaultSecret.__init__
pylint: __init__ method from base class 'VaultSecret' is not called (super-init-not-called)

* Make FileVaultSecret.read_file reg method again

The base class read_file() doesnt need self but
the sub classes do.

Rm now unneeded loader arg to read_file()

* Fix err msg string literal that had no effect
pylint: String statement has no effect

The indent on the continuation of the msg_format was wrong
so the second half was dropped.

There was also no need to join() filename (copy/paste from
original with a command list I assume...)

* Use local cipher_name in VaultEditor.edit_file not instance
pylint: Unused variable 'cipher_name'
pylint: Unused variable 'b_ciphertext'

Use the local cipher_name returned from parse_vaulttext_envelope()
instead of the instance self.cipher_name var.

Since there is only one valid cipher_name either way, it was
equilivent, but it will not be with more valid cipher_names

* Rm unused b_salt arg on VaultAES256._encrypt*
pylint: Unused argument 'b_salt'

Previously the methods computed the keys and iv themselves
so needed to be passed in the salt, but now the key/iv
are built before and passed in so b_salt arg is not used
anymore.

* rm redundant import of call from subprocess
pylint: Imports from package subprocess are not grouped

use via subprocess module now instead of direct
import.

* self._bytes is set in super init now, rm dup

* Make FileVaultSecret.read_file() -> _read_file()

_read_file() is details of the implementation of
load(), so now 'private'.
7 years ago
schwatvogel b8d371ca8b Fixes #23558 rpm key ids (#27847)
* Changed rpm-keyid extraction and verification method
* minor style fixes
* fixed rpm key deletion,added integration test for mono key,fixed wording in integration tests
7 years ago
Ricardo Carrillo Cruz d1d0cd5406 Add delay and check configuration when interfaces is set on eos_vrf (#27884)
* Add delay and check configuration is right when interfaces is set on eos_vrf

Per the spec we put up for declarative intent modules, we need to check declarative
intent params (in the case of eos_vrf it's 'interfaces') after a delay and non-declarative
params have been set.
If that doesn't meet desired state after delay, we fail the task.

* Check declarative intent param only if config changed

* Fix pep8 issue

* Change default of delay param to 10

* Revert bogus change on eos_vlan
7 years ago
Will Thames dbf9a65c05 Improve error messages when MySQLdb is not installed (#27871)
The python package is called MySQL-python in pypi, and
reporting this rather than mysqldb makes resolving the
problem far easier.
7 years ago
saichint babec35faa Fix nxos_vtp_password and nxos_vrf_interface for remove idempotency tests (#27724)
* fixes for 27600 27676

* add sanity tests
7 years ago
Sloane Hertel bd4f08823d [cloud] Cleanup of elasticache argspec (#27890)
Remove unnecessary specifications from the argument spec and use dict() instead of brackets for module uniformity.
7 years ago
Peter Sprygada 0b67ef4232 fixes #27527 (#27868) 7 years ago
Andreas Olsson ccc68f7157 Don't do additional path expand in file module
Since the module's path parameter is of the AnsibleModule type path
it's already being expanded. Hence no need to have the
set_fs_attributes_if_different method do its own expand.

This additional expand is an actual problem when the file module runs
recursively, as real existing file names can be mistakenly expanded to
something completely wrong and non-existing.

Fixes #25005
Fixes #25639
7 years ago
Abhijeet Kasurde 47ccb66ae3 Add support to add multiple NICs in vSwitch (#25857)
Add support for adding multiple NICs in VMWare vSwitch.
Also, updated documetation with example.

Fixes: #23522

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
7 years ago
giovannisciortino 1fb1793c70 helpers.py: Fixes #27334 include empty task file within a 'block' dis… (#27811)
* helpers.py: Fixes #27334 include empty task file within a 'block' disables the complete block

* include module: added warning if file without tasks is included
7 years ago
mzizzi 4648dc9702 [cloud] Add more configurable backoff implementations to CloudRetry/AWSRetry (#27251) 7 years ago
Moritz Grimm 11af034255 moved aws elasticache module to boto3 (#27441)
* moved aws elasticache module to boto3

* fixed error and improved code

* implemented requested changes

* now checking for missing boto3 packages in a better way

* now dynamically setting the default port depending on the engine if it is not set

* moved standard import in front of ansible ones

* now case insensitive in regards to engine name

* removed superfluous spaces

* now checking for None in the correct way

* removed elasticache module from exceptions to pep8 testing

* removed hardcoded default ports and letting aws decide if no port is given
7 years ago
Willem van Ketwich 6d402de25e ec2 launch configuration boto3 upgrade (#26348)
Updates ec2_lc module to use boto3. Adds parameters:

instance_id
placement_tenancy

Also added a second example using instance_id and updated the docs with the new parameters.
7 years ago
Ganesh Nalawade 12e81e68fc remoe duplicate net_lldp_interface (#27880) 7 years ago
Rob Nieuwenhuizen 73e19c2ed1 Add support for pip list format=columns (#21990)
* Use 'pip list --format=freeze' to simplify output code parse
7 years ago
Ganesh Nalawade 49eb81d573 junos_linkagg aggregate and other minor fixes (#27855)
* junos_linkagg aggregate and other minor fixes

* Minor change
7 years ago
Toshio Kuratomi 43f6a97bdc Fix security documentation to note it only works in conjunction with state=latest 7 years ago
Abhijeet Kasurde d3fe598202 [WIP] Add security option in yum module
Fix adds option to specify security updates in yum module

Fixes #11498

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
7 years ago
Toshio Kuratomi 0aa7c06395 Remove comments about import order
No longer needed as AnsiballZ fixed this
7 years ago
Toshio Kuratomi 2fc7c14dca Reclisence module_utils/api.py to BSD
Permission from all contributors to the file was granted here:
https://github.com/ansible/ansible/issues/27599

Fixes #27599
7 years ago
Toshio Kuratomi 8894c57753 Fix rabbitmq modules for python3 import
Also get rid of unnecessary capture of exception into a variable for
python-2.4 compat.
7 years ago
rahushen 441376c754 Fix #26024: suppress_fib_pending imdepotence for nxos_bgp (#27862) 7 years ago
Brian Coca e4a997c97e removed debug print
fixes #27864
7 years ago
Juan Manuel Parrilla 5df4ff8983 Fixes #25057, Added Hiera Lookup (#25060) 7 years ago
Arthur Kepler d828449611 Corrects default arg format used by datetime filter (#27612)
This ensures the default datetime format matches that of
datetime.datetime. Docs updated to match as well.
7 years ago
Mike Wiebe 65cf31e1ce Fix nxos_interface_ospf idempotence issue (#27783)
* Add tests and fix 27167

* Add modify test
7 years ago
Tyler 2571fc061e Add try/except to catch ipv6 interfaces that didn't appear on 'show interfaces' output (#27246) 7 years ago
Flavio Percoco Premoli 4fad156768 Allow for generating kubernetes YAML files from modules (#27833)
* Return the request dictionary in the results

It's sometimes useful to have access to the request params in a k8s
style. The dictionary returned by the request_params call can be
serialized into YAML to produce a k8s like file.

* Add dry_run option to skip module execution

By having support for dry_run executions, it'll be possible to generate
YAML files from the results dictionary by using the data in the
`requests` key.
7 years ago
Dag Wieers 3a86579b69 vcenter_license: New module to manage vCenter licenses (#25143)
This module supports check-mode and diff output.
It also includes basic integration tests.

This PR fixes #24971
7 years ago
Dag Wieers 71163d4d61 vmware_cluster: PEP8, imports, cosmetics (#25140)
This PR includes:
- Documentation improvements (mostly related to boolean defaults)
- Make PEP8 compliant
- Ensure imports are specific
- Few cosmetic changes (sort lists, casing, punctuation)
7 years ago
Zhangfei Gao ce4ada93f9 facts: fix arm64 ansible_processor_vcpus = 0
On arm64, /proc/cpuinfo has no 'model name', 'Processor', 'vendor_id', 'cpu', 'Vendor',
as a resul "ansible_processor_count": 0 & "ansible_processor_vcpus": 0
Add checking element "processor" to fix the issue.

$ ansible -i ~/all-in-one  -m setup all | grep proc
	"ansible_processor": [],
	"ansible_processor_cores": 1,
	"ansible_processor_count": 0,
	"ansible_processor_threads_per_core": 1,
	"ansible_processor_vcpus": 0,

$ cat /proc/cpuinfo
processor	: 0
BogoMIPS	: 100.00
Features	: fp asimd evtstrm aes pmull sha1 sha2 crc32
CPU implementer	: 0x41
CPU architecture: 8
CPU variant	: 0x1
CPU part	: 0xd07
CPU revision	: 1

$ ansible --version
ansible 2.3.1.0
config file =
configured module search path = Default w/o overrides
python version = 2.7.9 (default, Aug 13 2016, 16:27:01) [GCC 4.9.2]

With fix, checking processor as well:
$ ansible -i ~/all-in-one  -m setup all | grep proc
	"ansible_processor": [
	"ansible_processor_cores": 1,
	"ansible_processor_count": 16,
	"ansible_processor_threads_per_core": 1,
	"ansible_processor_vcpus": 16,

Signed-off-by: Zhangfei Gao <zhangfei.gao@linaro.org>
7 years ago
Ben Waters be5e2251a7 Fixes #21536: Allowing the ability to pass aws session paramters to credstash lookup (#23077)
* Allowing the ability to pass aws session paramters to credstash lookup
Fixes #21536
https://github.com/ansible/ansible/issues/21536

* Default environment variable lookup

To get around non lookup of environment variables. First, check for environment variables, then look for parameters

* Following AWS Precedence

http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html#config-settings-and-precedence
7 years ago
James Mighion bdccc2df3c Keep the diff even when running in check mode so we can tell if there is a diff or changed is true. (#27713) 7 years ago
Michael Price 8f4b13de73 Refactor E-Series VolumeCopy to use module_utils (#20902)
Refactor the NetApp E-Series module to utlize the common module_utils
and doc_fragments.
7 years ago
Nathaniel Case b9e80b6117 nxos_vrf_interface cleanup (#27642)
* Update RETURN, results, & execute_show_command
7 years ago
Dag Wieers ca7ce4459d aci.py: Add use_proxy support (#27735)
This PR includes:
- Support for the use_proxy parameter
- Additional notes related to proxy support and use_proxy parameter
7 years ago
Patrick Marques f1816bb438 Update module digital_ocean_sshkey (#18930)
* add new module do_sshkeys

* Deprecate digital_ocean_sshkey.py in favor of do_sshkeys

* Should not exit changed if name not set and key exist

* Add ansible metadata

* Return "ansible_facts" instead of "data" key

* Update documentation and remove unused import

* Remove facts module (1 module / PR)

* Fix

* Fix

* fix version_added

* Change old module status to deprecated

* Change old module status to deprecated

* Fix module deprecation

* Add support for new DO_OAUTH_TOKEN env var

* Fix python 2.6 positional index

* Update deprecation info

* Configure timeout and validate_certs for fetch_url

* rename do_sshkeys to digital_ocean_sshkeys

* Module is replaced, not deprecated anymore

* Fix module name

* Add version to new parameters

* Update module from boilerplate
7 years ago
colin-hanson-zocdoc ac15df8ab9 [cloud] Extend AWSRetry to also retry on `Throttling` exceptions (#22698)
We use ansible+cloudformation pretty heavily in our CI environments and occasionally bump into throttling issues.  By adding this error code to the retry system we should be able to achieve better stability.
7 years ago
Will Thames 2276c5f206 apt: Update cache if cache_valid_time is set (#27618)
It's not clear from the docs whether you need to set `update_cache`
when using `cache_valid_time`.

Setting `cache_valid_time` should imply `update_cache`. Update docs
to reflect this.
7 years ago
Nicolas Porcel fa6ce54011 Fix yum with rpm file or url when state=latest (#27775) 7 years ago
Slezhuk Yevgeniy 54035d5c59 Fix documentation issue in jira module (#27820) (#27823)
Fixes #27820
7 years ago
Nicolas Porcel 616d5ddc93 Clean downloaded rpm files after install (#20594) 7 years ago
Markus Krogemann d2f9160bc1 Fix documentation of name field in return values (#27822) 7 years ago
Jordan Borean 107e177658 win_stat: add explicit error message when file is in use (#27826)
* win_stat: add explicit error message when file is in use

* make the lock last a bit longer
7 years ago
Ricardo Carrillo Cruz b51a1e9045 Fix junos_netconf idempotency issues (#27804)
* Fix junos_netconf idempotency issues

* Fix pep8 issue

* Fix pep8 issue
7 years ago
René Moser fdaa803cca cloudstack: cs_vmsnapshot: fix pep8 (#27792) 7 years ago
René Moser f1ef61da4e cloudstack: cs_domain: tests: add update tests (#27791) 7 years ago
Trishna Guha edb5760723 nxos_vpc doc update to handle confirmation prompt (#27796)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
7 years ago
Sam Doran cb7b44f9e4 Remove _diff from play_context default
Follow up from PR #27746
7 years ago
Dag Wieers 25e67d804c iso_extract: Reimplement using 7zip (not requiring root) (#24937)
* Reimplement iso_extract using 7zip (not requiring root)

So one of the drawbacks of the original implementation is that it required root for mounting/unmount the ISO image.
This is now no longer needed as we use 7zip for extracting files from the ISO.

* Fall back to using mount/umount if 7zip not found

As discussed with others.

Also improved integration tests.
7 years ago
James Cammarata e0b0e61b32 Properly copy the role path when the IncludeRole object is copied
This exposed some additional errors in logic in IncludeFile, which
had to be fixed to deal with the fact that the role path (unlike paths
from includes) are always absolute paths.

Fixes #27345
7 years ago
Jacky Hu c770d657f3 Enable url lookup without a proxy
By introducing a use_proxy parameter to url lookup, the usage of proxy
is totally controllable.

(cherry picked from commit 11e4e51235)
from #23811
7 years ago
Benjamin 8fc113219c Enhance maven_artifact with a keep_name option (#22339)
It allows retaining the version number in the downloaded artifact's name when the version to be downloaded is dynamically determined ('latest').

So far, the behavior was to overwrite the version string in the artifact name with 'latest' which leaves no trace of what version the downloaded artifact has. E.g., you cannot use this information for further processing like transferring it to an RPM that is built from the artifact.

This fulfills feature request ansible/ansible#22337
7 years ago
Jérôme Guilbot e29daf34f7 [s3_sync] Add cache_control option (#27388) 7 years ago
David Barroso 0f60041dea Handle better the many ways information can be passed around (#27506)
* Handle better the many ways information can be passed around

* Fixing pep8 complaints

* Removing message
7 years ago
Dag Wieers a98e3fb81f Add RETURN information, doc improvements and PEP8
This PR includes:
- RETURN information (since the difference between status_code and
  status was confusing)
- Improvements to parameter definition (and docs)
- PEP8 compliancy
7 years ago
10sr 000f8dcc8f Fix bug that diff.always = yes in ansible.cfg won't be respected (#27746) 7 years ago
Keith Hawkridge f62fa16a89 [cloud] Fix Dead Letter config property name (#27733)
Closes #27688
7 years ago
Pilou b57af4428d rhn_register: fix broken imports, add unit tests (#26878)
Fix 'module' object is not callable

* rhn_register: fix Python 3 compatibility
* rhn_register: update requirements
* rhn_register: add unit tests
* Add missing method name
* use a dedicated line for XML related requirements
* rhn_register: drop support for Python 2.4
* rhn_register unit tests: fix Python 3 compatibility
* refactor in order to check order of the requests
7 years ago
Dag Wieers 0342760f5b sefcontext: PEP8 compliancy (#27742) 7 years ago
Philippe Dellaert 6d33e59ca1 Fix for subspec options validation issue #27715 (#27728)
* Fix for issue ansible/ansible#27715

* Also fixing mutually exclusive check

* Updating subspec checks
These changes take into account a spec with all features enabled and do
the following tests for subspecs:
1. Test proper specs
2. Test Alias
3. Test missing required param
4. Test mutually exclusive params
5. Test required if params
6. Test required one of params
7. Test required together params
8. Test required if params with a default value
9. Test basis subspec params
10. Test invalid subsec params
7 years ago
Toshio Kuratomi 3f12fccd02 Fix several things causing tracebacks with unicode cwd (#27731)
Fixes #27511
7 years ago
Sloane Hertel de5f8f1ec4 [cloud] allow module_utils to get creds without boto installed (#27647)
Would try to grab creds from `boto.config` and lead to a NameError in some cases.
7 years ago
René Moser 5700b09610 cloudstack: new module cs_instance_nic_secondaryip, replaces cs_nic (#26491) 7 years ago
Peter Sprygada 7b604368d3 adds new filter plugins for network use cases (#27695)
* adds new filter plugins for network use cases

* adds parse_cli filter
* adds parse_cli_textfsm filter
* adds Template class to network_common
* adds conditional function to network_common

* fix up PEP8 issues
7 years ago
Dag Wieers a34ef12d73 hpilo modules: PEP8 fixes (#27739) 7 years ago
Ganesh Nalawade d3e5d30f7c Add aggregate for junos modules and sub spec validation (#27726)
* Add aggregate for junos modules and sub spec validation

*  aggregate support of junos modules
*  aggregate sub spec validation
*  relevant changes to junos integration test
*  junos module boilerplate changes

* Add new boilerplate for junos modules

* Fix CI issues
7 years ago
Dag Wieers bcb3e33adb command: PEP8 compliancy (#27740) 7 years ago
Dag Wieers d125520071 imc_rest: Increase default timeout, add elapsed time (#26743)
The IMC interface can be quite slow depending on the XML fragments used.
So we increase the default timeout to 60 seconds, and return the elapsed
time so it is easier to determine what timeout value makes sense from
earlier runs.

We also renamed **imc_xml** to **imc_rest**, now that we still can.
7 years ago
Alex Bush 8e8d4df340 #26903 Invalid JSON-RPC request (#26906) 7 years ago
Dag Wieers 60276b60a2 win_stat: Add stat.isreg support (#27732)
* win_stat: Add stat.isreg support

This PR includes the following changes:
- Adds stat.isreg support (cfr. the stat module)
- Always returns stat.isdir, stat.islnk, stat.isreg, stat.isshared

* Remove the controversial part
7 years ago
Adam Miller 91ea8e5eaf Fixes #23895 firewalld handle port arg whitespace (#27577)
Signed-off-by: Adam Miller <maxamillion@fedoraproject.org>
7 years ago
Will Thames 4e0666fc4a Add oracle-se2 database support (#23482)
Fixes ansible-modules-core#4808
7 years ago
Toshio Kuratomi fbf6cb8fff Add boilerplate to fetch.py
This completes the modules/files directory so we can now check it for
regressions.
7 years ago
Sloane Hertel 467a1f54a3 s3_bucket: fix python3 sorting incompatibility (#27502)
* s3_bucket: fix policy sorting for python3 so strings are evaluated as less than tuples.

Add tests to ensure this behavior is maintained.

* Fix s3_bucket comparison function to work on both Python 3.5 and 3.6

* s3_bucket: document that cmp_to_key is used for python 2.7.

Add another test for s3_bucket to compare policies of different sizes.

* fix pep8

* Work around code-smell grepping by not using the word 'cmp'.
7 years ago
Pilou 96784160b1 rhn_register: call logout (#27533)
* missing requirement: list sufficient pkgs in error

* rhn_register: call logout when necessary

* rhn_register: remove useless return, small rewrite
7 years ago
Sloane Hertel dbbad16385 [cloud] New module: Add module for managing AWS Datapipelines (cloud/amazon/data_pipeline) (#22878)
* New module for managing AWS Datapipelines

* Supports create/activate/deactivate and deletion
* Handles idempotent creation by embeding the version in the
uniqueId field
* Waits for requested state to be reached, as Botocore doesn't
have waiters yet for datapipelines

* rename module, fix imports, add tags option, improve exit_json results, fix a couple bugs, add a TODO so I don't forget

fix pep8

allow timeout to be used for pipeline creation

make .format syntax uniform

fix pep8

fix exception handling

allow pipeline to be modified, refactor, add some comments, remove unnecessary imports

pipeline activation may not be in the activated state long

remove datapipeline version option

change a loop to a list comprehension

create idempotence by hashing the options given to the module minus the objects (which can be modified)

small bugfix

* data_pipeline unittests

make unittests pep8

fix bug in unittests

* remove exception handling that serves no purpose

* Fix python3 incompatibilities in datapipeline tests and add placebo fixture maybe_sleep for faster tests

Fix python3 incompatibilities in data_pipeline build_unique_id()

Don't delete a pipeline in diff_pipeline() because it's unexpected

Don't use time.time() because it causes an issue with placebo testing

re-recorded tests

fix pep8 in data_pipeline

Remove disable_rollback from tests

Make sure unique identifier is a string

re-record tests

* improve documentation and add another example

* use a placebo fixture instead of redundant code in tests

fix tests for PLACEBO_RECORD=false

* Fix data_pipeline docs

use isinstance instead of type()

fix documentation

* fix documentation

* Remove use of undefined variable from data_pipeline module and fix license

* fix copyright header
7 years ago
Dmitry Telegin 6841763d70 Support install root in URPMI module. Fixes #23475 7 years ago
Sam Doran af558698a0 Include aliases in ansible-doc output (#27702)
* Properly include aliases in ansible-doc output

Use correct variable name for storing aliases and only print them out if the list isn't empty.

Fixes #24498

* Only include choices in output if choices exist in the list
7 years ago
Abhijeet Kasurde 97240a9ebc Fix for missing import and boilerplate
Fix adds missing imports and boilerplate for proxysql.
It also remove get_exception calls in-favor of native exception.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
7 years ago
Chris Chambers afbad8789f cachamber - Issue #27566 - Correct urlparse import for maven_artifact module 7 years ago
Chad Bean 661d81ef86 Add new API param for new_host_delay (#21262) 7 years ago
Abhijeet Kasurde bf54a0c3e5 Fix missing import and boilerplate
Added fix for missing imports and boilerplate in files modules,
also, removed get_exception calls to match 2.6> exception handling.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
7 years ago
Will Thames 11da85f938 timer callback plugin: handle timezone changes better
A playbook that does `timezone name=Australia/Brisbane` on
a host previously in UTC will appear to take 10 hours.

Improve the seconds handling for playbooks that take longer
than one hour.
Improve the hours handling for playbooks that take longer than
one day.

TZ change before:
```
Playbook run took 0 days, 10 hours, 0 minutes, 36055 seconds
```
After:
```
Playbook run took 0 days, 0 hours, 0 minutes, 55 seconds
```

Sleep for 100s more than one hour before:
```
Playbook run took 0 days, 1 hours, 1 minutes, 3641 seconds
```

After:
```
Playbook run took 0 days, 1 hours, 1 minutes, 41 seconds
```
7 years ago
Mark McKinstry f17cb253a4 pear: add option for path to pear executable (#19200)
* add option for path to pear executable

this is useful if you have multiple versions of PHP installed at once,
using SCL PHP RPMs from Red Hat or some other method

* update version number

* improve wording
7 years ago
Pete Travis 7a35b95609 provide usable examples for sudo validation 7 years ago
Yaacov Zamir 48922660fe New model manageiq manageiq user (#26641)
* ManageIQ: manageiq_user module, module utils and doc_fragment

ManageIQ is an open source management platform for Hybrid IT.

This change is adding:
- manageiq_user module, responsible for user management in ManageIQ
- manageiq utils
- manageiq doc_fragment

* Handle import error

* Use formatting options

* group parameter is required

* changed doesn't need to be an attribute

* resource dictionary should contain values which isn't None

* move from monitoring to remote-management

* Use ManageIQ nameing convention

* Do not set defauts in arguments

* Use idempotent state parameter instead of action

* Check import error in the manageiq util class

* Update the miq documentation

* rename the connection configuration from miq to manageiq_connection

* All messeges start with non cap, fix typos, add examples, rename vars

* more typos fixes

* Make sure we insert only strings to logs by using % formating

* use suboptions keyword for the manageiq connection

* do not log the managiq connection struct (it include sensitive information like username and password)

* add missing from __future__

* ahh, wrong no-log line

* Use sub options
7 years ago
Abhijeet Kasurde 748fa5db35 Add check for requests module
Fix adds check for requests Python module and suggests user to install,
if no requests module installation found.

Fixes: #27643

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
7 years ago
George Nikolopoulos 31b4ae2e6a New module: manage Citrix Netscaler GSLB site configuration (network/netscaler/netscaler_gslb_site) (#27639)
* Add netscaler_gslb_site

* Lowercase enabled, disabled option values

* Add fixes in netscaler module utils needed for unit test success
7 years ago
George Nikolopoulos d88c07a037 New module: manage Citrix Netscaler GSLB service configuration (network/netscaler/netscaler_gslb_service)) (#27638)
* Add netscaler_gslb_service

* Lowercase enabled, disabled option values

* Add fixes in netscaler module utils needed for unit test success
7 years ago
George Nikolopoulos cd865be987 New module: manage Citrix Netscaler SSL certificate keys (network/netscaler/netscaler_ssl_certkey)) (#27641)
* Add netscaler_ssl_certkey

* Fix options

* Lowercase enabled, disabled option values

* Add fixes in netscaler module utils needed for unit test success
7 years ago
Gregory Danenberg 1e42e1e04c [cloud] cloudformation: fix changeset_name bug fix #27487 (#27518)
Closes #27487
7 years ago
George Nikolopoulos e2f907ae3e Add netscaler_gslb_vserver (#27640) 7 years ago
Christian Pointner 1ce2bf56a2 crypto/openssl_*: Standardize implementaton and add support keyUsage, extenededKeyUsage (#27281)
* openssl_csr: make subjectAltNames a list

* csr module now uses the new standard way to build openssl crypto modules

* add check functions for subject and subjectAltNames

* added support for keyUsage and extendedKeyUsage

* check if CSR signature is correct (aka the privatekey belongs to the CSR)

* fixes for first PR review

* fixes for second PR review

* openssl_csr: there is no need to pass on privatekey as it can be accessed directly

* openssl_csr: documentation fixes
7 years ago
rahushen e0f482a8c5 Fixes #27340 - make indent consistent for nxos_config (#27652) 7 years ago
Trishna Guha 3da9607203 fix unexpected key argument for eos_config replace (#27683)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
7 years ago
Trishna Guha 91a9564b3b modify indent to avoid re-run of src template fail (#27686)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
7 years ago
Felipe Garcia Bulsoni b060d0ccba Initial commits for integration of HPE OneView resources with Ansible (#26026)
* Initial commit for integration of HPE OneView resources with Ansible Core. Adding FC Network and FC Network Fact modules and unit tests, and OneView base class for all OV resources.
7 years ago
James Mighion baaa1ef2ec Sanitizing all responses from aireos. (#27660) 7 years ago
Eduard Iskandarov a1abe7d941 add kubernetes beta resources to clustering/kubernetes module (#18953) 7 years ago
Adrian Likins 6fbd0a8bb5 Add set_fact_persistent action and module. (#26153)
* Add 'cacheable' param to  set_fact action and module.

Used just like set_fact, except facts set with cacheable: true
will be stored in the fact cache if fact caching is enabled.

set_fact normally only sets facts in the non_persistent_fact_cache, so they
are lost between invocations.

* update set_facts docs

* use 'ansible_facts_cacheable' in module/actions result

* pop fact cacheable related items out of args/results

We dont want to use 'ansible_facts_cacheable' result item
or 'cacheable' arg as actual facts, so pop them out of the
dicts.
7 years ago
jctanner e1abed28ba Fix version_added from #21822 (#27665) 7 years ago
jctanner 93f98effe9 Update version added from #20777 (#27662) 7 years ago
Chekov2k a0370b8254 Add pv_options to lvg module so that, for example, metadatasize can b… (#21822)
* Add pv_options to lvg module so that, for example, metadatasize can be specified (e.g. for openstack cinder volumes)

* Fixing version added
7 years ago
mwellmeyer 54a3bcc4ec add iptables tcp-flags option (#20777)
* add iptables tcp-flags option

* fix invalid character in iptables documentation

* fix wrong default value for tcp_flags in the documentation
7 years ago
Sloane Hertel b0efbc5418 [cloud] ec2_vpc_igw: fix check mode - fixes #27490 (#27637)
Fix check mode for adding/removing tags; boto's DryRun is not equivalent to check mode.

Fixes #27490
7 years ago
Sloane Hertel c02deef454 [cloud] filter by vpc and subnet if provided before terminating instances (#27394) 7 years ago
piotrkarbowski-ciklum a260d99f74 ec2_ami_copy.py: Fix WaiterError handling. (#27416)
* ec2_ami_copy.py: Fix WaiterError handling.

Change suggested by Adam Johnson at https://github.com/ansible/ansible/issues/26971

* ec2_ami_copy.py: WaiterError: fail_json: add exception parameter.

* ec2_ami_copy.py: import traceback
7 years ago
Toshio Kuratomi e992e4f436 Add missing copyright header in modules cleaned up yesterday 7 years ago
Abhijeet Kasurde 5e2184c683 Fixing broken imports and get_exception for ipa
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
7 years ago
Brandon Davidson 3d20a2ea82 Fix typo in cloud/amazon/ec2_vpc_nacl_facts (#27534) 7 years ago
Abhijeet Kasurde be58fa979d Fix broken import in cloudformation
* Fix imports
* Add new GPLv3 Licence

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
7 years ago
Nathaniel Case 123b5e222f nxos_bgp_neighbor fixes (#27348)
* Fix `timers` idempotency

* `shutdown` is not documented as having a `default` option

* dynamic_capability is the inverse of BOOL_PARAMS
7 years ago
Adrian Likins 27a015f0ad add a 'min' type for gather_subset to collect nothing (#27085)
previously gather_subset=['!all'] would still gather the
min set of facts, and there was no way to collect no facts.

The 'min' specifier in gather_subset is equilivent to
exclude the minimal_gather_subset facts as well.

   gather_subset=['!all', '!min'] will collect no facts

This also lets explicitly added gather_subsets override excludes.

   gather_subset=['pkg_mgr', '!all', '!min'] will collect only the pkg_mgr
fact.
7 years ago
DavidVentura c85b36d220 Fix Proxmox module crashing if the hostname doesn't exist and there's no vmid (#21305)
* fail the execution instead of panicking when the hostname is not found and the vmid was not provided

* return an empty vmid list if the hostname doesn't exist
7 years ago
mharista c85f363aaa Add module cv_server_provision for integration with Arista CloudVision Portal. (#25450)
* Add module cv_server_provision for integration with Arista CloudVision Portal.

* Doc update.

* Remove shebang from test file. Update short description with company and product name.

* Update exception syntax to Python3 style.

* Remove blank line between imports.

* Remove newlines from RETURN documentation.

* Add cvprac to unittest requirements.

* Update unittest format. Add a few additional tests.

* Mock exceptions from cvprac so the library is not needed for unittests.

* Mock cvprac imports.

* Update unit tests to support python 3.5.

* Mock full cvprac library for unittests.

* Update Jinja2 import to pass updated CI checks.

* Update cvprac imports format for new CI tests.

* Add __metaclass__ and __future__.
7 years ago
Simon Dodsley 7fbd924cbb Add Pure Storage Host Group module (#26355) 7 years ago
Simon Dodsley b3865b173d Add Pure Storage Protection Groups module (#26356)
Update documentation to be correct
Change type to bool
7 years ago
jctanner baf1ed9100 [WIP] Create preserved_copy function in basic.py to perserve file ownership. (#27344)
Create preserved_copy function in basic.py to perserve file ownership.

* Add a test for template preserved backup
* Use a script to get the random names
* bytes to strings
* Remove dump of hostvars
* Stop being fancy and create a testuser instead
* Fix pep8
* set file attributes
* Pass the correct data to set_attributes_if_different
* Use -j instead -b and pass the attributes as a string instead of a list
* remove debugging message
* Use shell to softly set the attr

Fixes #24408
7 years ago
Abhijeet Kasurde b266204afa Fix JSON parsing for Python3
Fix corrects the parsing of JSON output in Python 3
environment by using to_text API.

Fixes: #26489

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
7 years ago
Nathaniel Case b93878b685 Minor cleanup to nxos_vrrp (#27593)
* Safe changes

* Fold `[0]` into `execute_show_command()`

We only ever execute one command, so only return the one response

* Streamline `results`
7 years ago
Abhijit Menon-Sen 20b0716948 Allow variables to be passed in to template lookup plugin (#18662)
This allows a single template to be evaluated with different values in
the same task. For example, with a template like 'x:{{a}}', one could do
something like this:

    - foo:
        a: "{{ lookup('template', 'x.j2', template_vars=dict(a=foo[item])) }}"
        b: "{{ lookup('template', 'x.j2', template_vars=dict(a=bar[item])) }}"
      with_items:
        - x
        - y

…and "a" and "b" would expand to different strings based on what we
passed in to the template lookup.
7 years ago
Andrew Saraceni 435a562630 Rename win_group_member module to win_group_membership (#27614)
* rename win_group_member to win_group_membership

* adding details to BOTMETA.yml
7 years ago
Jordan Bach 24e393aef1 allow use of jinja2 variables for ec2_group from_port/to_port params (#27145) 7 years ago
Adrian Likins 2b0a7338d4 Handle win style CRLF newlines in vault text (#27590)
When parsing a vaulttext blob, use .splitlines()
instead of split(b'\n') to handle \n newlines and
windows style \r\n (CRLF) new lines.

The vaulttext enevelope at this point is just the header line
and a hexlify()'ed blob, so CRLF is a valid newline here.

Fixes #22914
7 years ago
Toshio Kuratomi 7d2597a68d change the gpl header to single line version and order of imports 7 years ago
Toshio Kuratomi 15902f2496 Fix for ansiballz filenames conflicting with python stdlib modules
The AnsiBallZ wrapper is transferred to the remote machine with
a filename similar to the Ansible-module it runs.  For modules like copy
and tempfile, this can end up conflicting with stdlib modules on the
remote machine depending on how python is setup there.  We have a little
bit of code in the wrapper to deal with this by removing the path that
the ansible module resides in from sys.path.

On MacOSX, that code was having a problem.  The path the module ends up
in included a symlinked directory so we were looking for a path in
sys.path but we had to look for the unsymlinked path instead.

Fix that by using os.path.realpath() instead of os.path.abspath()
7 years ago
Adrian Likins 75a8be9a5d Add back support for vault_password_file config var (#27597)
Got removed in arg parsing updates. Now added back in
setup_vault_secrets().

The default value for DEFAULT_VAULT_PASSWORD_FILE was also
set to '~' for some reason, change to to no default.

Add integration tests.
7 years ago
Matt Davis f19ed387a7 fix non-pipelined output parsing in winrm.py (#27606)
* ensures stdout/stderr are converted to text type in py3 to avoid json serialization failures
7 years ago
Robin Roth b134352d8c WIP: Replace boilerplate (#27554)
* Replace boilerplate

* Enable test on packaging/os
7 years ago
CyberArk BizDev 6aa851c6bc CyberArk InitialSupport (#21764)
* Added cyberarkpassword lookup plugin

Added cyberarkpassword lookup plugin: It allows to retrieve credentials
(password, sshkey) from CyberArk Digital Vault

* Added Modules: cyberark_authentication & cyberark_user

Added Modules:
- cyberark_authentication: Logon/Logoff to CyberArk Vault
- cyberark_user: user management

These 2 modules use CyberArk Privileged Account Security Web Services
SDK

* Update cyberark_authentication.py

* Update cyberark_user.py

* Removed ternary conditional to comply with 2.4

* Replaced usage of iteritems() for items() to comply with python3

* PEP8 Updates

* Fixed Doc Issues

* Doc Fixes

* More Doc Fixes

* Removing cyberark_user module, and cyberark lookup plugin

for initial approval of PR, and continue with 2 different PRs after PR
#21764 is approved.

* PEP8 Fixes

* Moved cyberark modules to identity category

From IRC #ansible-devel recommendation (@bcoca) I moved cyberark to
identity category so the authorized maintainers can provide feedback
and move it forward.

* Updates based on community_review by bjolivot

- Updated description lines to have full stops in the documentation
section.
- changed file to use delimiter-separated words instead of camel case
- Updated AnsibleModule module_spec parameters to use
mutually_exclusive, required_if and required_together parameters to
avoid manual validation of the parameters.
- Added comments for more readability.
- Removed “required”: false as they are implicit.
- Enhanced check_mode handling.

* PEP8 Updates

* Updates based on IRC Feedback June 6

* Fixed description for token item

* Fixed Documentation RETURN string

* Fixed PEP8 W291 trailing whitespace

* Changes based on feedback from community review

* Added import to_text from ansible.module_utils._text

* Updates based on recommendation from community

* Changed Exception for Error in friendly messages in try/except blocks

* Updates based on community review (bcoca & dagwieers)

* Fixed httplib for python3 (http.client)
7 years ago
Ganesh Nalawade 6a0d9d1498 Fix junos_logging integration test failure (#27605) 7 years ago
Adrian Likins 9f57920eab Fix --ask-vault-pass prompt to match old when poss (#27602)
If we don't use more than one vault-id, and we use
--ask-vault-pass, instead of using the new vault prompt
format ('Vault password (my_vault_id): ') we use the old
one ('Vault password: ').

This avoids confusing Tower when it needs to detect an
interactive vault password prompt.

This also potentially could allow vault password prompts
to be customized per vault_id.
7 years ago
saichint 37392318a6 fix nxos_vlan and nxos_switchport issues (#27505) 7 years ago
Adrian Likins a52a4332fd Fix aruba_config flake8 failures (#27603)
* Fix aruba_config flake8 failures

* fix intefaces_file build/flake8 fail
7 years ago
Sloane Hertel d8eccdda3a [cloud] make ec2 paging() more functional and add paging to ec2_lc_facts (#27355) 7 years ago
Sloane Hertel ad2c1e1838 [cloud] ec2_customer_gateway: add routing option to allow bgp_asn to be optional (#27276)
fixes #27157

 add routing option to allow bgp_asn to be optional
7 years ago
Nathaniel Case ec8cbbf926 Fix aruba boilerplate 7 years ago
Sloane Hertel 61ebb89fe3 improve cloudformation failures (#27427) 7 years ago
jhawkesworth a43af128cf Add mac address to windows facts (#25803) 7 years ago
Roman Belyakovsky 42039cd436 New module: manage debian network interfaces file /etc/network/interfaces (system/interfaces_file) (#25295)
* Added new module interfaces_file

* interfaces_file: added unit tests

* interfaces_file: added golden files for unit tests

* interfaces_file: moved to system modules

* interfaces_file: fixed code formatting and convention issues
7 years ago
Brandon Davidson 4ec8744b8b Ignore main route table association when determining which associations to remove. (#23781)
They can't be removed anyway, and will just throw an error if you try to disassociate them.
7 years ago
Jens Carl cc72dead45 New module: Add module to collect facts for Amazon Redshift Cluster (cloud/amazon/redshift_facts) (#22615)
* New module redshift_facts

Gather facts about aws Redshift cluster(s).

* Fix she-bang, PEP8 violations, and ansible metadata.

* Bump version_added to "2.4"

* Fix some typos and add supporting check mode

* Fix type of RETURN fields

Fix type of RETURN fields number_of_nodes and
automated_snapshot_retention_period from integer to int.

* Add traceback information to fail_json()
7 years ago
Nathaniel Case c017d0c7c0 Fix fortios & netscaler boilerplate
Sorry
7 years ago
Trishna Guha 407dc2dc68 fix nxos_vrf removal failure (#27547)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
7 years ago
Gaurav Rastogi 23ec711494 Added flags for Federated objects used in GLSB (#27531) 7 years ago
Ganesh Nalawade c4e06a1735 ios implementation for net_interface (#27459)
* ios implementation for net_interface

*  ios_interface implementation
*  ios_interface integration test

* net_interface integration test for ios and other refactor

* Update boilerplate and minor refactor
7 years ago
Ganesh Nalawade 70ce394840 Persistent connection timer changes (#27272)
*  Add command_timeout timer that defines the amount
   of time to wait for a command or RPC call before
   timing out.
*  Remove connect_retries and connect_interval configuration
   varaible and replace it with connect_retry_timeout to control
   the timeout value of connection to local scoket.
*  Make required changes to netowrk action plugins and relevant
   network files in module_utils.
*  Required documentation changes.
7 years ago