Commit Graph

1026 Commits (9456f93ea833b5d813fd5041ff6a2ee67dba12e7)

Author SHA1 Message Date
Matt Clay 93d9b04f1d Fix uri options test to work again. 8 years ago
Matt Clay 011b324638 Do not run `win_chocolatey` in CI tests.
The test is failing repeatedly.
8 years ago
Ricardo Carrillo Cruz 6e56a61535 Add ios_banner module (#22687)
With unit and integration tests.
8 years ago
Dag Wieers 72e7927dd5 win_scheduled_task: Added frequency: once and check_mode support (#22611)
* win_scheduled_task: Added frequency: once and check_mode support

This patch includes:
- Renamed `execute:` parameter to `executable:`
- Renamed `argument:` parameter to `arguments:`
- Implemented `frequency: once` support
- Implemented check_mode support
- Fix idempotency issue related to empty description
- Added integration tests

* Improve the integration test structure

I think this is a great way to test normal mode and check-mode from the same playbook.

* Small fixes after review
8 years ago
Jordan Borean 6ce338d29c win_service Added -Force option and minor cleanup (#22598)
* win_service Added -Force option and minor cleanup

* Changed parameter and fixed typos
8 years ago
Matt Davis ce56da69b2 make windows async ... async (#22624)
Fixes #22575 - issue under new exec wrapper where unconstrained handle inheritance (for stdin) caused WinRM to block on breakaway processes. Uses explicit handle inheritance to ensure that only stdin read handle gets inherited. Adds test to ensure that async is actually async.
8 years ago
Peter Sprygada 39c38bf30d fixes candidate var type in junos shared lib (#22551)
* candidate var can now be string, list or element
* fixes minor bug in junos_template for backup argument
* disabled invalid integration test for junos_template
8 years ago
Peter Sprygada 2b2072a8c9 roll up of fixes and updates for junos modules (#22543)
* removes cli functions
* adds comment and confirm to arguments
* implements zeroize argument
* fixes get_diff function in junos shared lib to return diff
* lots of minor bug fixes in junos_config
* minor syntax fixes in junos_netconf
* updates netconf integration tests
8 years ago
John R Barker 89e4226051 add missing files (#22496) 8 years ago
John R Barker 5dac2ee00c Test eos_banner (#22201)
* eos_banner docs improvements

* run eos_banner tests

* basic eos_banner tests

* remove trailing newlines

* remove hack

* Various eos_banner fixes

No unicode tests, as the device doesn't support it
Correctly set provider
result.command should be empty list if no changes

* test eos_banner over eapi

* revert docs changes, moved to separate PR
8 years ago
John R Barker 41f5648c44 Test system (#22420)
* ios_system

* tests for ios_system

* tests for *_system

* working ios_system on cli

* Typo

* Loopback10 (single word, upeprcase)

* Revert docs changes

* Working iosxr_system tests

* eos, not nxos

* nxos_system
8 years ago
Dave Kasberg 8102e66425 Fixes for idempotent issue in cnos_vlan module and fixes for vlag/portchannel tests. (#22385)
* misc fixes for idempotent issue in cnos_vlan

* Fix up hyperlinks in module documentation

* spell correction
8 years ago
Alex Lo 8e910cce8a ec2_group: description is only required when group state is present (#19791)
* description is only required when group state is present

also note that AWS requires a non-empty description when creating a security group

* clarify description requirement
8 years ago
Marius Gedminas 15c7288ab9 Show diff when file: state=link changes the symlink target (#22243)
* Show diff when file: state=link changes the symlink target

* Integration test for symlink target change

* Also check soft link idempotency
8 years ago
Peter Sprygada 6c8025ce5c adds eos_system integration tests (#22214)
* adds integration test cases
* updates eos_system with minor bug fixes
8 years ago
Peter Sprygada 911600acf9 update junos_command integration tests (#22213)
fixes integration test to check for full rpc-reply string when
converted from xml.  This is a change from 2.2 as the rpc-reply tag
is no longer stripped off
8 years ago
Robin Roth 3afc993f3a Fix git clone tag with depth=1
* Fixes #21316, add testcase based on this
* Add option `--branch NAME` to git clone command in case of branch or
tag in combination with depth=1
  * This option should work back to at least git 1.8 and thus on all
  supported distributions
* Provide better warning if depth is dropped
8 years ago
Dave Kasberg 3c44644c08 New module: cnos_vlag (#21535)
* VLAG module and tests

* Correct the link in the description of the module

* Move roles to integration/roles directory and remove aliases file.

* update module short description

* Change module directory name to Lenovo

* change import cnos statement
8 years ago
Dave Kasberg 9258b62707 New module: cnos_conditional_template (#21794)
* Initial commit of cnos_conditional_template

* fix compile error in module, change module short description, move roles to integration/roles

* fix line length

* Change module directory name to Lenovo

* change import cnos statement
8 years ago
Dave Kasberg 059a0d07a4 New module: cnos_condition_command (#21793)
* Initial commit of cnos_condition_command

* fix pep8 error of line too long

* fix pep8 tab/space issue

* Move roles to integration/roles directory and remove aliases file.

* Update module short description

* Change module directory name to Lenovo

* change import cnos statement
8 years ago
Dave Kasberg 2f126829bf Initial cnos_image commit (#21789)
* Initial cnos_image commit

* corrected required/default values in documentaiton

* fixed choices for imgtype

* removed a colon

* Move roles to integration/roles directory and remove aliases file.

* update module short description

* Change module directory name to Lenovo

* change import cnos statement
8 years ago
Dave Kasberg 70af90436a New module: cnos_rollback (#21788)
* Initial commit for cnos_rollback

* Move roles to integration/roles directory and remove aliases file.

* update module short description

* Change module directory name to Lenovo

* change import cnos statement
8 years ago
Dave Kasberg 267cc0edfc New module: cnos_backup (#21787)
* Initial commit of cnos_backup

* Move roles to integration/roles directory and remove aliases file.

* update module short description

* change import cnos statement
8 years ago
Dave Kasberg 6549c70091 New module: cnos_template (#21786)
* Initial cnos_template commit

* fix compile errs, update short description, move roles to integration/roles

* now commit the module

* Change module directory name to Lenovo

* change import cnos statement
8 years ago
Dave Kasberg c112539538 New module: cnos_command (#21785)
* Initial commit for cnos_command

* Move roles to integration/roles directory and remove aliases file.

* update module short description

* Change module directory name to Lenovo

* change import cnos statement
8 years ago
Dave Kasberg d96aa55d4c New module: cnos_save (#21754)
* initial comment of cnos_save

* Move roles to integration/roles directory and remove aliases file.

* update the module short description

* Change module directory name to Lenovo

* change import cnos statement
8 years ago
Dave Kasberg 2e6df415b6 New module: cnos_showrun (#21752)
* initial commit of cnos_showrun

* Move roles to integration/roles directory and remove aliases file.

* update module short description

* Change module directory name to Lenovo

* change import cnos statement
8 years ago
Dave Kasberg e5ceb3a99c Fix for cnos.py utility file for Python3.5 (#21750)
* fix in cnos.py utility file

* fix compile errors in cnos.py, update module short description in cnos_vlan.py, move vlan roles under integration/roles

* corrections in readme

* Change module directory name to Lenovo

* change import cnos statement
8 years ago
Dave Kasberg 709b03d1c8 New module: cnos_facts (#21743)
* cnos_facts module commit

* fix options string

* Move roles to integration/roles directory and remove aliases file.

* update module short description

* Change module directory name to Lenovo

* change import cnos statement
8 years ago
Dave Kasberg 4bf20fb174 New module: cnos_interface (#21613)
* initial commit

* fix tab/space issue

* fix space issue in vars/main.yml

* Move roles to integration/roles directory and remove aliases file.

* update module short description

* change module directory name to Lenovo and change import cnos statement
8 years ago
Dave Kasberg 14c2c787cb New module: cnos_portchannel (#21589)
* cnos_portchannel initial commit

* Fix line length issue in module

* fix whitespace on line 90

* correct yamllint space issue

* Move roles to integration/roles directory and remove aliases file.

* update module short description

* Change module directory name to Lenovo

* change import cnos statement
8 years ago
Dave Kasberg 3ed34032cd New module: cnos_bgp (#21587)
* cnos_bgp module

* Move roles to integration/roles directory and remove aliases file.

* update module short description

* Change module directory name to Lenovo

* change import cnos statement
8 years ago
Matt Davis a60d358e56 Revert "win_service_stat: Added module" (#22184) 8 years ago
Jordan Borean 778dc9ad38 win_copy: added remote and content options (#21546)
* win_copy: added remote and content options

* readded comment about original_basename accidentally removed
8 years ago
Jordan Borean f4f09c9dbf Rewrote win_service with more options/check_mode (#19143) 8 years ago
Jordan Borean 3da806f32a win_service_stat: Added module (#21944) 8 years ago
Peter Sprygada 392d9e2aa6 updates prepare_nxos_tests to use nxos_nxapi module (#22150)
replaces nxos_config with nxos_nxapi
8 years ago
Dag Wieers 52959ebdc1 wait_for_connection: Wait for system to become reachable (#20011)
* WIP: wait_for_connection: Wait for system to be reachable

This action plugin allows to check when a system is back online and
usable by Ansible.

As an example, when doing a SysPrep and running Enable-WinRM.ps1, it
takes between 10 to 20 seconds between the WinRM TCP port to open, and
it actually being able to server Ansible requests. This time is variable
and depends on the boot process.

Current implementation is specific for Windows (WinRM) only, this will
be fixed shortly.

This fixes #19998

* Support other transport types

* Various improvements

- Fix reported typo
- Add transport_test support in accelerate plugin
- Ensure port is an integer

* Improve examples

* Small fixes

- Use correct ConfigureRemotingForAnsible.ps1 script name
- Only use win_ping when remote shell is known to be Powershell
- Add integration tests to CI framework
8 years ago
Matt Martz 6e8e90ceb4 Warn when using the deprecated HEADER_ arguments (#20236)
* Make sure the uri module warns about using the deprecated HEADER_ arguments, so that we can actually deprecate in a future version

* Use module.deprecate

* No need to de-dupe ourselves, looks like it is done somewhere I didn't initially see
8 years ago
John R Barker 2f6213a219 result.commands (not .updates) (#22139) 8 years ago
John R Barker 9f49d4b8f4 iosxr tests to work with 2.3 (#21998) 8 years ago
Peter Sprygada f95a11a9db fixes eos_eapi to error on wrong transport (#21993) 8 years ago
jhawkesworth a1047e6273 Adds integration test steps to win_regedit test to cover Extras 2090 (#15641)
* Adds integration test steps to win_regedit test to cover Extras 2090

* Fixed merge conflict and error in win_regedit integration tests

* fixed pep8 space after comma requirement discovered by ci build
8 years ago
Peter Sprygada 1c3d448a29 updates eos_facts integration test cases (#21988) 8 years ago
Dag Wieers a66d5dcc43 win_chocolatey: Add integration tests (#21930)
And also fix a known issue.
8 years ago
Peter Sprygada 8dbb12a9c4 adds integration tests for nxos_mtu (#21969) 8 years ago
Peter Sprygada 4c354c9c70 adds integration tests cases for nxos_feature (#21966) 8 years ago
Peter Sprygada 0cb2019293 roll up of bug fixs for nxos_evpn_global (#21961)
* updates nxos_evpn_global module
* adds integration test cases
* adds unit test cases
8 years ago
Nathaniel Case 9b9ed59d98 Vyos config fixes (#21862)
* Fix vyos signatures to match new versions

* Fix test cases referring to 'updates' instead of 'commands'

* I think this is an artifact of `connection: network_cli`?
8 years ago
Peter Sprygada a284c3f7ea roll up of fixes for nxos_facts (#21954)
* fixes commands to work with nxapi
* updates test case timeouts
8 years ago
Peter Sprygada 16a39639f5 fixes minor bugs in eos_eapi module (#21925)
* module will now check protocol running state before return
* warns on config argument no longer being needed
* lots of integration test cases updated
* updates unit and integration test cases for state check

fixes #21908
8 years ago
Peter Sprygada 7c3957cc0c fixes nxos_template integration test case (#21953)
* test case implemented invalid argument: match
* changed argument to force: yes
8 years ago
Peter Sprygada 1f9b503e89 fixes issue with config parents on eos modules (#21923)
eos_config module wasn't respecting config block path (parents).  This
patch fixes that problem.  Also fixes a number of integration tests
cases

fixes #21903
8 years ago
Peter Sprygada 14c05d9e2b roll up of fixes for nxos_config (#21949)
* fixes provider to not log entries
* fixes nxapi send_request with config statements
* fixes nxapi get_config()
* updates nxos_config integration tests
8 years ago
Peter Sprygada 01ac1bc6e5 roll up of fixes from nxos integration tests (#21948)
* now fails nxos_nxapi if the transport=nxapi
* fixes typos in nxos_nxapi integration tests cases
8 years ago
Matt Davis 7798297317 temp disable Windows batch test 8 years ago
Adrian Likins 8830cde28d Fix 'task name is not templated in retry callback' (add task_name property to TaskResult) (#21214)
Fix 'task name is not templated in retry callback'

Add a task_name property to TaskResult that knows to
check in TaskResult._task_fields.

Add integration test for v2_retry_runner callback

Fixes #18236
8 years ago
Adrian Likins a2907c4d5c Add smoke/intg tests for vault cli (#21679)
Add smoke/intg tests for vault cli
8 years ago
Dag Wieers aebf6c8c92 powershell.ps1: Ensure Fail-Json() works with Hashtables (#21697)
Without this change a dictionary $result object would be emptied if it
is anything but a PSCustomObject. Now we also support Hashtables.
8 years ago
Peter Sprygada 381f7209f8 fixes issue in nxos_config when retrieving current config (#21843)
When parsing the configuration, the wrong indent level was set so the
configurations could not be properly compared.  Also noted that
defaults: yes needed to be added to the integration tests to make the
test cases valid, which is also included in this patch

fixes #21828
8 years ago
Matt Clay cba91c7f44 Test placement (#21801)
* Fix test placement and update messaging.
* Add note about group selection.
8 years ago
Matt Clay 9462707f21 Test www.redhat.com instead of docs.ansible.com. 8 years ago
Jordan Borean a80251ff02 Added win_region module (#19147) 8 years ago
Matt Davis 8527013fbe Complete rewrite of Windows exec wrapper (#21510)
* supports pipelining for faster execution
* supports become (runas), creates interactive subsession under WinRM batch logon
* supports usage of arbitrary module_utils files
* modular exec wrapper payload supports easier extension
* integrates async wrapper behavior for pipelined/become'd async
* module_utils are loaded as true Powershell modules, no more runtime modifications to module code
8 years ago
Tom Melendez 8dcec1b659 [GCE] gce_net integration test (#21502) 8 years ago
Dave Kasberg dbb452100a New module: cnos_vlan and various utility files (#21107)
* First set of CNOS network modules

Two modules: cnos_vlan and cnos_command.  First 2 of 17 CNOS modules

* Revert "First set of CNOS network modules"

This reverts commit 63da68b2a857e622b449f514050eed25fbcf0a35.

* cnos_vlan module

First of 17 CNOS modules

* Modify playbook for cnos_vlan module testing

* fix issue found by shippable in cnos.py

* cnos_backup module

* Fix Python3.5 compilation error

* remove cnos_backup module from this PR

* add aliases file so that testing of the cnos_vlan module will be skipped.

* Use empty aliases file

* utility scripts under module_utils changed to BSD license.

* clean up PEP8 issues, add cnos_vlan tests

* remove blank lines from yml files

* remove more blank lines

* remove even more blank lines

* Revert "remove even more blank lines"

This reverts commit bb3998661ce387260340bca39d5f146f5ec54f44.

* re-submit last commit

* fix blank lines in this file under parsing

* fix yamllint errors in doc section of cnos_vlan

* Fix errors reported by Sanity check using validate-modules

* change test playbook to include tasks for all modules

* fix additional pep8 errors

* more fixes, plus fix for python3

* fix for empty options section, removed unnecessary documentation

* fix up documentation section

* Correct options capitalization

* fix example section, add options

* Fix example section of the documentation
8 years ago
Adrian Likins 499d3a1b53 add a intg test for issue #19835 (#21487)
(postgresql_user changing role_attr_flags with no_password_checks
fails)
8 years ago
Michael Scherer 6fae1d2bbf Make password lookup treat /dev/null as a special case
I have from time to time a need of random password without
wanting to write them down (one example is mailman list creation,
that requires a password to be given to be sent to the list owner).

But using /dev/null do not return null, but the empty string, which
doesn't generate a password at all and so do not achieve my use case.
8 years ago
Toshio Kuratomi e4a80965de Test the slurp module 8 years ago
Toshio Kuratomi 99fd2328af Fix hash filter for non-ascii strings and Python3
hashlib hashes operate on byte strings.  When given a text string on
Python3, hashlib backtraces.  When given a text string on Python2,
hashlib will backtrace if the string contains non-ascii characters.
Encode the text string to utf-8 prior to hashing to avoid this problem.

Fixes #21452
8 years ago
Matt Clay 9389fafae8 Enable MySQL tests on FreeBSD. 8 years ago
John R Barker 59306e2aef Add files via upload (#21062) 8 years ago
Jordan Borean 5cabe420ea Added win_reg_stat module (#19145) 8 years ago
Jordan Borean 1c885cb848 Added fix for win_file with broken symlinks (#19146) 8 years ago
Jordan Borean 1ce5fcf061 Added win_find module (#19144) 8 years ago
Marius Gedminas 2efb692cc4 known_hosts: support --diff (#20349)
* known_hosts: support --diff

* known_hosts: support --diff also without --check

* Add unit tests and fix incorrect diff in one corner case

Tests are good!

* Refactor for readability

* Python 3 compat

* More Python 3 compat

* Add an integration test for known_hosts

* Handle ssh-keygen -HF returning non-zero exit code

AFAICT this is a bug in ssh-keygen in some newer OpenSSH versions
(>= 6.4 probably; see commit dd9d5cc670):
when you invoke ssh-keygen with -H and -F <host> options, it always
returns exit code 1.  This is because in ssh-keygen.c there's a function
do_known_hosts() which calls

  exit (find_host && !ctx.found_key);

at the end, and find_host is 1 (because we passed -F on the command line),
but ctx.found_key is always 0.  Why is found_key always 0?  Because the
callback passed to hostkeys_foreach(), which is known_hosts_hash(),
never bothers to set found_key to 1.

* This test does not need root

* Avoid ssh-ed25519 keys in sample known_hosts file

Older versions of OpenSSH do not like them and ssh-keygen -HF
aborts with an error when it sees such keys:

  line 5 invalid key: example.net...
  /root/ansible_testing/known_hosts is not a valid known_hosts file.

* Fix Python 3 errors

Specifically, the default mode of tempfile.NamedTemporaryFile is 'w+b',
which means Python 3 wants us to write bytes objects to it -- but the
keys we have are all unicode strings.
8 years ago
Ricardo Carrillo Cruz 0adca6b7d4 Set block indentation to 1 on iosxr templates (#21105)
Network devices in the lab have by default an indentation of 1 for
sub-sections, and so does the netcfg.NetworkConfig constructor
indent param.
This will fix reported issue 21055, and make the integration tests
to pass.

Fixes #21055
8 years ago
Brian Coca c86a17b7a0 refactoring async
- centralized skipping
- also fixed module name broken by previous refactor
- let action modules handle async processing
- moved async into base action class's module exec
- action plugins can now run final action as async
- actually skip copy if base skips
- fixed normal for new paths
- ensure internal stat is never async
- default poll to 10 as per docs
- added hint for callback fix on poll
- restructured late tmp, now a pipeline query
- moving action handler to connection as networking does
- fixed network assumption invocation is always passed
- centralized key cleanup, normalized internal var
- _supress_tmpdir_delete now in _ansible_xxx and gets removed from results
- delay internal key removal till after we use em
- nicer tmp removing, using existing methods
- moved cleanup tmp flag to mking tmp func
8 years ago
Matt Clay ccb1b742f5 Fix win_stat test for changes from PR #20876
The changes to win_file in that PR resulted in changes to file
sizes and file hashes expected by the win_stat tests.
8 years ago
Brian Coca a2c38c47aa added docs for vault and made trigger shorter: !vault (#20985)
* added docs for vault and made trigger shorter: !vault

* added single var valuting

* Update playbooks_vault.rst

Edit pass for spelling and grammar. Ship it!

* Update playbooks_vault.rst

Typo fixes.
8 years ago
jhawkesworth 2c70450e23 Fix 'touch' mode so it creates zero size files. (#20876) 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
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
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
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
Matt Clay cb76200c7d PEP 8 E111 & E114 cleanup. (#20838) 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
Trond Hindenes 679a3cb1cc Merge pull request #20599 from dagwieers/win_regedit-cleanup
win_regedit: Cleanup, check/diff mode support, HKCC fix
8 years ago
Dag Wieers 0e80ba1867 Fix the integration test to comply recent changes 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
Patrick Ogenstad ac527ef86f Check for removal not allowed errors (#19251) 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
Ansible Test Runner ff1a732ffd Increase timeout for http server in uri test. 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
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