Commit Graph

2065 Commits (635e3fe9ee84bea9788f14fe911ec4ec35489e49)

Author SHA1 Message Date
jhawkesworth 2c70450e23 Fix 'touch' mode so it creates zero size files. (#20876) 8 years ago
Peter Sprygada d226f31a0f fixes ios and eos command modules (#20989)
* returns support for prompt/response over cli
* now sends native dict instead of str command
* fixes issue with run_commands() in ios to jsonify request
* updates unit test cases
8 years ago
Toshio Kuratomi 1df7d95cec Module utils default path (#20913)
* Make the module_utils path configurable
* Add a config value to define the path site module_utils files
* Handle module_utils that do not have source as an error
* Make an integration test for module_utils envvar working
* Add documentation for the ANSIBLE_MODULE_UTILS config option/envvar
* Add it to the sample ansible.cfg
* Add it to intro_configuration.
* Also modify intro_configuration to place envvars on equal footing with
  the config options (will need to document the envvar names in the
  future)
* Also add the ANSIBLE_LIBRARY use case from
  https://github.com/ansible/ansible/issues/15432 so we can close out
  that bug.
8 years ago
Matt Clay 6580fb2cd1 Fix exception in module validator. 8 years ago
Matt Martz 829c0b8f62 Update validate-modules (#20932)
* Update validate-modules

* Validates ANSIBLE_METADATA
* Ensures imports happen after documentation vars
* Some pep8 cleanup

* Clean up some left over unneeded code

* Update modules for new module guidelines and validate-modules checks

* Update imports for ec2_vpc_route_table and ec2_vpc_nat_gateway
8 years ago
Nathaniel Case 1718719d77 vyos_facts 2.3 (#20939)
* Update vyos_facts documentation

* Replace runner for run_commands

* vyos_facts tests

* Update documentation

* vyos_facts is supported by core
8 years ago
Brian Coca 6ca5fb49c3 allow debug to be 'changed' (#20957)
* allow debug to be 'changed'

fixes #14430

* removed test that checked against this
8 years ago
Nathaniel Case d87fc9605f vyos_config 2.3 (#20577)
* Rename vyos2 over vyos

* Update vyos_config to LocalAnsibleModule

Change result key 'updates' -> 'commands'

vyos_config is supported by core

* vyos_config tests

* Enable bracket config use

* Sanitize config before use
8 years ago
Stephane Maarek c33812450e fixed type mapper and added tests (#20963) 8 years ago
Dag Wieers 3dbce15ccb win_shortcut: Add missing $check_mode definition + bugfix + tests (#20911)
* win_shortcut: Add missing $check_mode definition

For some reason this entry was missing, possible a merge-conflict gone
wrong :-(

* Added integration tests and bugfix

Add missing changes.
8 years ago
Matt Clay 309a37de86 Add `--debug` option to `ansible-test`. 8 years ago
Matt Clay 64f98f855d Update PEP 8 legacy files list. 8 years ago
Dag Wieers bbe2903d63 Fix broken Shippable 8 years ago
John R Barker 553b6151ad iosxr tests: Initial work for 2.3 (#20883)
Ensure a loopback device exists for testing
Remove provider:
Default is to run task on Network, device, use delegate_to: localhost for local tasks.
8 years ago
Vlad Glagolev 039d207d24 Add Source Mage GNU/Linux facts (#19671)
* Add Source Mage GNU/Linux facts

* Add unit test for OS-detection
8 years ago
Toshio Kuratomi 5c38f3cea2 Combine jimi-c and bcoca's ideas and work on hooking module-utils into PluginLoader.
This version just gets the relevant paths from PluginLoader and then
uses the existing imp.find_plugin() calls in the AnsiballZ code to load
the proper module_utils.

Modify PluginLoader to optionally omit subdirectories (module_utils
needs to operate on top level dirs, not on subdirs because it has
a hierarchical namespace whereas all other plugins use a flat
namespace).

Rename snippet* variables to module_utils*

Add a small number of unittests for recursive_finder

Add a larger number of integration tests to demonstrate that
module_utils is working.

Whitelist module-style shebang in test target library dirs

Prefix module_data variable with b_ to be clear that it holds bytes data
8 years ago
sebastianneubauer 3f14061584 s3 module: fix urlparse invocation and netloc mixup on Python 3 (#20836) 8 years ago
Matt Clay 503e85ed0e PEP 8 E111 cleanup. 8 years ago
Matt Clay f80224f828 PEP 8 E111 cleanup. 8 years ago
Matt Clay 85300883ef PEP 8 E111 cleanup. 8 years ago
Matt Clay 23f2efbc8d PEP 8 E111 cleanup. (#20841) 8 years ago
Matt Clay 462ab6b1db PEP 8 E111 cleanup for nxos modules. 8 years ago
Matt Clay cb76200c7d PEP 8 E111 & E114 cleanup. (#20838) 8 years ago
Toshio Kuratomi 1609afbd12 Unittests for some of module_common.py (#20812)
* Unittests for some of module_common.py
* Port test_run_command to use pytest-mock

The use of addCleanup(patch.stopall) from the unittest idiom was
conflicting with the pytest-mock idiom of closing all patches
automatically.  Switching to pytest-mock ensures that the patches are
closed and removing the stopall stops the conflict.
8 years ago
Wayne Witzel III 0e72f3bd71 Ansible Tower organization module (#20355)
* add Ansible Tower organization module

* skip Python 2.4 check for ansible_tower module

* make spec and doc match, extract tower auth helper method

* added auth params at module level

* support check mode

* extract check mode check to ansible_tower utils, add utils to 2.4 skip

* update interpreter shebang

* remove colon from docs

* no log for password, verify_ssl default to true
8 years ago
Ricardo Carrillo Cruz e70bc06ea1 Refactor iosxr_command to make use of network_connection plugin (#20772) 8 years ago
Peter Sprygada a4a5db56f6 updates python2.4-skip
* adds module_utils/netconf.py
* adds module_utils/junos.py
8 years ago
Matt Clay 10d9318de7 PEP 8 indent cleanup. (#20800)
* PEP 8 E121 cleanup.

* PEP 8 E126 cleanup.

* PEP 8 E122 cleanup.
8 years ago
Peter Sprygada 85d78390f9 adds new module eos_system (#20797)
* provides declarative resource for configuring eos system parameters
* supports network_cli connection plugin only
* adds unit tests for module using mock interfaces
8 years ago
Peter Sprygada d2dd2fbe49 adds module eos_banner (#20796)
* new module allows for configuration of eos multiline banners
* adds unit test cases for module
8 years ago
Matt Clay e2c0b375d3 PEP 8 cleanup. (#20790)
* PEP 8 E115 cleanup.
* PEP 8 E131 cleanup.
8 years ago
Matt Clay d0d1158c5e PEP 8 cleanup. (#20789)
* PEP 8 E703 cleanup.
* PEP 8 E701 cleanup.
* PEP 8 E711 cleanup.
* PEP 8 W191 and E101 cleanup.
8 years ago
Matt Clay d913f69ba1 PEP 8 W291 whitespace cleanup. 8 years ago
Matt Clay 95789f3949 PEP 8 whitespace cleanup. (#20783)
* PEP 8 E271 whitespace cleanup.
* PEP 8 W293 whitespace cleanup.
* Fix whitespace issue from recent PR.
8 years ago
Jordan Borean 971783a7fd Feature/win stat extra info (#19148)
* Added more return results to win_stat

* Changed Win2012 methods to support older versions in setup

* staging of the tests to work with older servers
8 years ago
Matt Clay 63b1e0c277 Fix infrequent PEP 8 issues. 8 years ago
Peter Sprygada 6c89c587cc refactors eos_config module to use network_cli (#20741)
* update eos_config to use eapi exclusively and remove cli transport
* add unit test cases for eos_config
* updates action plugin to handle both eapi and network_cli connections
8 years ago
Matt Clay 6ef1a6aeb6 Add `pep8` to `ansible-test`. (#20745)
The rule sets and legacy file list are a first draft.
It is likely that they will need to be revised.
8 years ago
Dag Wieers 3a0a74dc18 Make test/runner less verbose when spawning instances
As discussed on IRC
8 years ago
Matt Clay f42fa8879b Temporarily remove Windows Server 2016 from CI. 8 years ago
Peter Sprygada 271c0c4574 new module eos_user (#20759)
* adds new module for managing local user accounts on eos devices
* adds unit test cases for module

This module only supports network_cli
8 years ago
Trond Hindenes 679a3cb1cc Merge pull request #20599 from dagwieers/win_regedit-cleanup
win_regedit: Cleanup, check/diff mode support, HKCC fix
8 years ago
Peter Sprygada c8dcc7f5d6 refactors eos_command module (#20739)
* eos_command now uses network_cli connection plugin
* adds unit test cases for eos_command module
8 years ago
Peter Sprygada 57660abf33 refactor eos_eapi module (#20740)
* eos_eapi module now requires network_cli plugin
* adds unit test cases for eos_eapi module
8 years ago
Peter Sprygada ad83756b48 updates eos shared modules (#20738)
* eos module now uses network_cli connection plugin
* adds unit tests for eos module
* eapi support now provided by eapi module
* updates doc fragment for eapi common properties
8 years ago
Matt Clay 5503b89831 Run fewer tests for winrm config script changes. 8 years ago
Tom Melendez c2edc8a264 [GCE] Google Cloud Pubsub Module (#19091)
* Google Cloud Pubsub Module

The Google Cloud Pubsub module allows the Ansible user to:
* Create/Delete Topics
* Create/Delete Subscriptions
* Change subscription from pull to push (and configure endpoint)
* Publish messages to a topic
* Pull messages from a Subscription

An accessory module, gcpubsub_facts, has been added to list topics and subscriptions.

* Added docs for state field to DOCUMENTATION and RETURN blocks.
8 years ago
Dag Wieers 0e80ba1867 Fix the integration test to comply recent changes 8 years ago
Matt Clay 76d563af79 Temporarily switch Windows tests to us-east-1.
Will switch back to us-east-2 after AWS limit increase is done.
8 years ago
Matt Clay 31d6b6ef67 Run postgresql tests on FreeBSD. (#20676)
* Use vars for user, group and locale suffix.
* Switch tests from `es_MX` to `es_ES`.
* Enable postgresql tests on freebsd.
* Work-arounds for service restart on freebsd.
8 years ago
Matt Clay 5d5e5e25a2 Only set git config during test if unset.
This makes the git test less destructive.
8 years ago
Ganesh Nalawade b67f50570e Add unit testcase for junos_command module (#20034)
* Add unit testcase for junos_command module
* Mock third party module import
* Remove third party module requirements
8 years ago
Peter Sprygada 8ddffcb1a6 new connection plugin netconf (#20636)
* adds connection plugin for creating modules that use netconf
* adds basic unit test cases for connection plugin
8 years ago
Patrick Ogenstad ac527ef86f Check for removal not allowed errors (#19251) 8 years ago
Ricardo Carrillo Cruz b44505e281 Merge pull request #20559 from rcarrillocruz/refactor_ios_config_network_connection
Refactor iosxr_config to make use of network_connection plugin
8 years ago
Matt Clay d8b18d79fa Disable assertions that fail on WS 2016. 8 years ago
Matt Clay d6cdd91511 Remove `win_fetch` from CI due to instability. 8 years ago
Ricardo Carrillo Cruz a8cfe4a5d7 Refactor iosxr_config to make use of network_connection plugin 8 years ago
Ansible Test Runner ff1a732ffd Increase timeout for http server in uri test. 8 years ago
Matt Clay fa7f84217b Add startup checks to ansible-test. 8 years ago
Ricardo Carrillo Cruz 034330e52f Fix typo on test_ios_config_before_after_no_change test (#20565) 8 years ago
Matt Clay 836e0b59d2 Fix git remote url change detection. (#20587)
* Fix git remote url change detection.

When comparing paths, unfrackgitpath must be called on both sides
of the comparison. Otherwise comparisons involving symlinks will
return incorrect results.

* Re-enable git test on OS X.

* Return None from unfrackgitpath when path is None.
8 years ago
Nathaniel Case b3662fdad1 vyos_command 2.3 (#18994)
* Peter's new module_utils/vyos
* Update vyos_command
* Restore `set terminal length $ANSIBLE_VYOS_TERMINAL_LENGTH` in vyos
* vyos_command tests
* Remove provider mentions from vyos_command
* Extend get_config to take (and cache) various `show configuration` commands
8 years ago
Matt Clay 61e6e7868c Improve jinja2 test coverage. (#20533)
* Run `template` test on latest jinja2 version.
* Update jinja2 install for groupby_filter.
* Clean test output dir for each test.
8 years ago
Matt Clay d87ee022bb Enable more `ios` tests on Shippable. 8 years ago
John R Barker 11c15bbbaf Disable IOS tests for the moment (#20524) 8 years ago
John R Barker a12033a6e0 integration/targets/ios_* work to support IOS (#20414)
* WIP

* Don't set connection: network_cli in the playbook

* ios_config tests now passing

* Create test loopback device

* delete

* ios_* pass (apart from ios_facts)

* Remove provider lines
8 years ago
John R Barker 7330ab8062 Correctly call get_config (#20452)
* Correctly call get_config

* remove debug

* Check for empty flags and LocalAnsibleModule

* Peter's feedback
8 years ago
James Cammarata 188c3c608a Don't restrict local jinja2 variables to those that start with l_
Per a change in jinja2 2.9, local variables no longer are prefixed
with l_, so this updates AnsibleJ2Vars to pull in all locals (while
excluding some) regardless of name.

Fixes #20063

(cherry picked from commit 4d49b317929b86e1fc1b0cbace825ff73b372dc7)
8 years ago
Matt Clay 9213d0c5b0 Fix and enable more tests for osx and freebsd. (#20482)
* Fix `iterators` test for osx.
* Enable `git` test for osx.
* Enable `get_url` test for osx and freebsd.
* Remove unused SNI_URI from uri test.
* Use ansible hosted SNI host oustside docker.
* Enable `uri` test for osx and freebsd.
* Enable `gathering_facts` test for osx.
* Skip single task on osx until test is fixed.
8 years ago
Matt Martz 537b3b75a6 Add jinja2 groupby filter override to cast namedtuple to tuple. Fixes #20098 (#20362)
* Add jinja2 groupby filter override to cast namedtuple to tuple. Fixes #20098

* Address some of the requested changes

* Quoting

* Print the python path and version

* Be less explicitly verbose, rely on implicit verbosity
8 years ago
Matt Clay a8fb6f0958 Use jinja2 import instead of pip to get version.
This resolves issues with older versions of pip.
8 years ago
Andrew Gaffney ac51266e8f Add pipeline-ish method using dd for file transfer over SSH (#18642) 8 years ago
James Cammarata 9d549c3498 Fixing iterator bug related to reworking of end-of-role detection
Bug was introduced in cae682607
8 years ago
Matt Clay 7ed67746cf Enable Windows 2016 on Shippable.
Also launch Windows instances on us-east-2 and all others on us-east-1.
8 years ago
Matt Clay 4ba9f63afe Use multiple AWS regions in ansible-test. (#20429)
* Move ansible-test EnvironmentConfig to util.
* Use multiple AWS regions in ansible-test.
8 years ago
James Cammarata cae682607c Reworking the way end of role detection is done
Rather than trying to enumerate tasks or track an ever changing cur_role
flag in PlayIterator, this change simply sets a flag on the last block in
the list of blocks returned by Role.compile(). The PlayIterator then checks
for that flag when the cur_block number is incremented, and marks the role
as complete if the given host had any tasks run in that role.

Fixes #20224
8 years ago
Matt Clay 4673a9c9c2 Generate ssh key once for network tests. 8 years ago
Matt Clay 4c97bad28e Update ansible-test network change classification. 8 years ago
Matt Davis b2a16379c8 new module: win_path (#20073) 8 years ago
Matt Clay 89898ed734 Update coverage constraints for ansible-test. 8 years ago
Matt Clay 3c51ce56fd Enable more network support in ansible-test. (#20372)
* Only start platform instances with tests selected.
* Enable ios on Shippable.
* Show inventory in explain mode.
* Fix indentation of generated network inventory.
* Update classification of network module_utils.
8 years ago
gaudenz 08e08ac775 new module cloudscale_server (#20175) 8 years ago
Ricardo Carrillo Cruz 825456f279 Merge pull request #20363 from rcarrillocruz/iosxr_template_network_cli
Refactor iosxr_template to network_cli plugin
8 years ago
David M. Lee fde551fa2a Adding support for Amazon ECR (#19306)
* Adding support for Amazon ECR

This patch adds a new module named ecr, which can create, update or
destroy Amazon EC2 Container Registries. It also handles the management
of ECR policies.

* ecs_ecr: addressed review feeback

 * Renaming ecr to ecs_ecr
 * Fixed docs
   * Removed bad doc about empty string handling
   * Added example of `delete_policy`
 * Removed `policy_text` option; switched policy to `json` type so
   it can accept string or dict
 * Added support for specifying registry_id
 * Added explicit else after returned if clauses
 * Added `force_set_policy` option
 * Improved `set_repository_policy` error handling
 * Fixed policy comparisons when AWS doesn't keep the ordering stable
 * Moved `boto_exception` into the module
8 years ago
Ricardo Carrillo Cruz ae630fff56 Refactor iosxr_template to network_cli plugin 8 years ago
John R Barker 64432c8f7c WIP: net_command: Initial tests for VyOS (#20147)
* Conditional include on ansible_network_os

* copy & paste error

* More tests

* More tests

* junos tests (based on vyos)

* remove excessive whitespace

* Pass in ansible_network_os

* net_command for ios

* consistent debug

* wrapp line

* ansible-test changes made in another PR

* ansible-test changes made in another PR
8 years ago
Matt Clay 893e2e0d35 Use ansible-test in integration test README. 8 years ago
Matt Clay dbb89549ff Improve ansible-test error handling and timeouts. (#20328)
* Eliminate warning/retry on old instance check.
* Increase instance start timeout for windows.
8 years ago
Matt Clay 55b9a11468 Require coverage < 4.3.2 to avoid bugs. 8 years ago
Matt Clay 34bca6fb55 Use distro packaged jinja2 instead of pip version. 8 years ago
Matt Clay b5d5888b6e Add support for ios to ansible-test. 8 years ago
Matt Clay ad65274643 Only test map on jinja2 >= 2.7 8 years ago
Toshio Kuratomi 32fbd4ba24 Test the extract filter without the map filter.
map + extract is the usual way to use it but map isn't available on
older versions of jinja2 that we still work with.  Test extract even on
those versions.
8 years ago
Matt Clay e2bd71ac02 Clean up inventory generation in ansible-test. (#20313) 8 years ago
Matt Clay a59ce3a7f9 Add retry on failure to get instance. 8 years ago
Matt Clay f3130898bb Retry instance start on error. 8 years ago
Matt Clay 203e375449 Fix python 3.6 install. 8 years ago
Matt Martz d25a70846f Only add Content-Type if not specified in headers. Fixes #20046 (#20234)
* Only add Content-Type if not specified in headers. Fixes #20046

* Update documentation to indicate body_format will not override Content-Type if specified in headers
8 years ago
Matt Clay f534573dcf Enable first network tests on Shippable. (#20208) 8 years ago