Commit Graph

3567 Commits (9fa46e7f946bfe244d0e126bd96588b460592826)

Author SHA1 Message Date
Zim Kalinowski 1c520ff70b adding postgresql firewall rule (#45077)
* adding postgresql firewall rule

* fixed test problems

* add state into the doc

* use lropoller

* updated samples and some naming
6 years ago
Zim Kalinowski ca5460dd86 Adding mysql firewall rule module (#45074)
* adding mysql firewall rule

* fixed mysql firewall rule

* use mgmtclient from common

* fix pep8

* small updates

* minor docs fix
6 years ago
jctanner 0b15ad00c1
Add a test target for the foreman inventory script (#46837)
Add a test target for the foreman inventory script
6 years ago
Jordan Borean 6e2897647c
win test: add http tester container to Windows tests (#46606) 6 years ago
Matt Martz a06a5ded61
Do not use mutable defaults in FieldAttribute, instead allow supplying a callable for defaults of mutable types. Fixes #46824 (#46833) 6 years ago
Nathaniel Case e9a7a741f8
Add missing connection param to test (#46831) 6 years ago
Christian Kotte ade5d938c3 VMware: Improve module vmware_host_config_manager (#46264)
* Improve module description
* Add check mode support and change message
6 years ago
Will Thames b772485d97 Ensure that k8s_facts always returns resources key (#46733)
Fix bug returning `items` key if NotFound exception is hit
6 years ago
Jordan Borean 0f5331645f
ansible-test: add skip/windows/... alias to skip tests on specific Windows versions (#46845)
* ansible-test: add skip/windows/... alias to skip tests on specific Windows versions

* show what tests were skipped

* changes to logic to only skip if all Windows targets are set to skip

* codestyle improvements

* change warning message based on review

* check args type before running the Windows path
6 years ago
cahlchang 1cce11b39c [AWS] Support check mode in aws ec2_instance module (#46774)
* fix checkmode

* Added checking test to existing test playbook

* Added test for check mode
6 years ago
Adam Miller fd97c8e56c
fix yum proxy username/password handling (#46291)
Fixes #46249

Signed-off-by: Adam Miller <admiller@redhat.com>
6 years ago
Shuang Wang cd1faca6e0 copy - support recursive copying with remote_src (#43998)
* Allow copy module to work with recursive and remote_src #14131
6 years ago
Adam Miller fb6e91bf98
yum module properly check for None config_file (#46641)
* yum module properly check for None config_file
* add conf_file test cases to yum integration tests

Signed-off-by: Adam Miller <admiller@redhat.com>
6 years ago
Anil Kumar Muraleedharan d0e89bc1bb Lenovo finetune modules (#46623)
* Making username password etc non mandatory as we use persistence connection.
Some documentation fine tuning also done.

* To update version which was tested against.

* Adding Bacon switch (NE0152T) to device rules

* Qalthos Review catch

* Updating version

* Changing documentation to add Bacon switch. This is effective since 2.8
6 years ago
Christian Kotte 2230f40041 VMware: Add check mode support to module vmware_host_firewall_manager (#46266) 6 years ago
Christian Kotte 0bc2e6795d VMware: Gather extended datastore facts (#46546)
* Add datacenter_name alias
* Add check mode support
* Add extended datastore information
6 years ago
Adam Miller ad405fc21e yum module handle list optional empty strings properly (#46634)
Fixes #46517

Signed-off-by: Adam Miller <admiller@redhat.com>
6 years ago
Brian Coca 8743e6ae2e remove default from delegate_facts to inherit (#45492)
* remove default from delegate_facts to inherit

fixes #45456

* test delegate_facts

* added note about inheritance and defaults

* yamllint
6 years ago
Jordan Borean f34f75be45
win_uri: use variable for httpbin host (#46734) 6 years ago
Pilou 955579cd72 rabbitmq_user: 'node' parameter: add default value (#38156)
* Remove unnecessary workaround

* add test: set RABBITMQ_NODENAME environment variable

The following error occurs:

  TASK [rabbitmq_user : Add user] ***
  fatal: [testhost]: FAILED! => {
    "changed": false,
    "cmd": "/usr/sbin/rabbitmqctl -q list_users",
    "rc": 69,
    "msg": "Error:********@c65c2bc59398'. Please see diagnostics information and suggestions below.\n\nMost common reasons for this are:\n\n * Target node is unreachable (e.g. due to hostname resolution, TCP connection or firewall issues)\n * CLI tool fails to authenticate with the server (e.g. due to CLI tool's Erlang cookie not matching that of the server)\n * Target node is not running\n\nIn addition to the diagnostics info below:\n\n * See the CLI, clustering and networking guides on http://rabbitmq.com/documentation.html to learn more\n * Consult server logs on node test@c65c2bc59398\n\nDIAGNOSTICS\n===========\n\nattempted to contact:********@c65c2bc59398\n * effective user's home directory: /var/lib/rabbitmq\n * Erlang cookie hash: 3MxcYFrJzfhEL+FlUfLlQw==",
    "stderr":  [...],
    "stderr_lines": [
      "Error: unable to perform an operation on node 'test@c65c2bc59398'. Please see diagnostics information and suggestions below.", "",
      "Most common reasons for this are:", "",
      " * Target node is unreachable (e.g. due to hostname resolution, TCP connection or firewall issues)",
      " * CLI tool fails to authenticate with the server (e.g. due to CLI tool's Erlang cookie not matching that of the server)",
      " * Target node is not running", "",
      "In addition to the diagnostics info below:", "",
      " * See the CLI, clustering and networking guides on http://rabbitmq.com/documentation.html to learn more",
      " * Consult server logs on node test@c65c2bc59398", "",
          "DIAGNOSTICS", "===========", "",
          "attempted to contact: [test@c65c2bc59398]", "",
          "test@c65c2bc59398:",
      "  * connected to epmd (port 4369) on c65c2bc59398",
      "  * epmd reports: node 'test' not running at all",
      "                  other nodes on c65c2bc59398: [rabbit]",
      "  * suggestion: start the node", "",
      "Current node details:",
      " * node name: rabbitmqcli2@c65c2bc59398",
      " * effective user's home directory: /var/lib/rabbitmq",
      " * Erlang cookie hash: 3MxcYFrJzfhEL+FlUfLlQw==", ""
    ],
    "stdout": "",
    "stdout_lines": []
  }

* node parameter: fix default value

'rabbit' is the default value mentioned in the module documentation.
6 years ago
Evgeni Golov 7c66c90afc introduce `module_utils.urls.fetch_file` as a wrapper to download and save files (#19172)
* module_utils.urls: add fetch_file function

* apt: use fetch_file instead of own download()

* unarchive: use fetch_file instead of own codecopy

* apt: add test for deb=http://…

* unarchive: add test for a remote file download and unarchive

* yum: replace fetch_rpm_from_url by fetch_file

* use NamedTemporaryFile

* don't add a dot to fileext, it's already there
6 years ago
Felix Fontein a74774488d docker_container: add port range and IPv6 support for published_ports (#46596)
* Allow port ranges.

* Adding IPv6 support for published_ports.

* Die when hostname is passed instead of IP address.

* Added changelog.
6 years ago
Christian Kotte ccfa6ff011 VMware: Add check mode support to module vmware_host_ntp (#46268) 6 years ago
Christian Kotte c4cfeb183f VMware: Add check mode support to module vmware_host_service_manager (#46271) 6 years ago
Felix Fontein 77127d6768 docker_container: allow more mount modes for volumes (#46598)
* Being more strict about volume mount modes.
6 years ago
Abhijeet Kasurde 513be8923d
VMware: new module vmware_host_feature_facts (#45966)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
Felix Fontein 8afe46dc02 docker_container: improve publish all ports functionality (#46594)
* Improve handling of published_ports: all.

* Add changelog.
6 years ago
Jordan Borean bc6d441cf2
Win chocolatey facts module (#46610)
* add module win_chocolatey_facts

* rename example name

* fix ansible-test errors

* add integration tests

* fix integration test

* implementation of improvement proposals

* implementation feedback

* implementation feedback

* fix trailing-whitespace

* implementation feedback

* fix version

* fix lint

* add test targets

* Updated modules docs and tests

Co-authored-by: Simon Baerlocher <sbaerlocher@users.noreply.github.com>
6 years ago
flowerysong be05069c61 Port the sns module to boto3 (#45634)
* Port sns to boto3

* Exception handling for ARN lookup

* sns: Add integration tests
6 years ago
Christian Kotte 5cd1ba3477 VMware: Add check mode support to module vmware_host_dns_facts (#46530) 6 years ago
Felix Fontein a520ca3298 docker_container, docker_image_facts: allow to use image IDs (#46324)
* Allow to specify images by hash for docker_container and docker_image_facts.

* flake8

* More sanity checks.

* Added changelog.

* Added test.

* Make compatible with Python < 3.4.

* Remove out-commented imports.
6 years ago
Will Thames aec263df8a Add test suite for ec2_vpc_igw before boto3 upgrade (#45903) 6 years ago
tstoner ae363da5f5 Purging logging configuration before running playbook (#46302) 6 years ago
Matt Clay e2b6047514
Add symlinks sanity test. (#46467)
* Add symlinks sanity test.
* Replace legacy test symlinks with actual content.
* Remove dir symlink from template_jinja2_latest.
* Update import test to use generated library dir.
* Fix copy test symlink setup.
6 years ago
Christian Kotte a4961ff32a VMware: Add check mode support to module vmware_host_firewall_facts (#46265) 6 years ago
Christian Kotte ab26119637 VMware: Add check mode support to module vmware_host_acceptance (#46260)
* Improve module description
* Add check mode support
6 years ago
John Imison c4cfa387ea Lookup plugin for rabbitmq (#44070)
* Adding a basic get lookup for rabbitmq.

* Always return a list

* If content type is JSON, make accessible via dict.

* Fixed incorrect json.loads variable and missing raise

* Change to document returned data

* Fixed pep8 issues

* Adding integration testing

* Moving lookup intgration tests to new target

* New rabbitmq lookup plugin (#44070).

* New rabbitmq lookup plugin (#44070).

* PR review feedback updates

* Testing pika is installed

* Minor mods to tests

* Check if connection is already closed or closing

* Updated tests and connection testing

* PR review feedback updates

* PR review include ValueError in AnsibleError output

* Suggesting to use set_fact when using returned variable more than once.

* Cleaned up some tests, added some notes and handling connection closure on some exceptions.

* Removed finally statement and added some additional error handling.

* Added some additional error handling.

* PR review updates.

* Additional integration tests and removing return in finally

* Updated version

* Changing back to running tests on ubuntu.

* Additional tests

* Running tests on  Ubuntu only

* Fixing syntax error

* Fixing ingtegration tests and a string/byte issue

* Removed non-required test and fixed BOTMETA

* Trying to fix integration test failure on ubuntu1404

* Some issues occured when handling messages from the queue with to_native.  Switching to to_text resolved the issues.

* Renaming channel to queue (thanks dch). Disabling trusty tests.
6 years ago
Sam Doran b74279d14c Use proper index value with insertbefore on a one line file (#46071)
Add tests and changelog
6 years ago
Jordan Borean 1de88cbaa9
win_chocolatey: remove test packages after tests are run (#46431) 6 years ago
Christian Kotte 1589424c3e VMware: Add check mode support in vmware_host_config_facts (#46272) 6 years ago
Jordan Borean e972287c35 win_exec: refactor PS exec runner (#45334)
* win_exec: refactor PS exec runner

* more changes for PSCore compatibility

* made some changes based on the recent review

* split up module exec scripts for smaller payload

* removed C# module support to focus on just error msg improvement

* cleaned up c# test classifier code
6 years ago
Matt Clay 33b34f5c82 Rebalance shippable/posix/ CI groups. 6 years ago
Jordan Borean c20433e5e4 remove comments from multiplle yaml string that breaks tests for now 6 years ago
Pilou b76c4c840e WIP: Check that union Jinja filter can be chained (#46298)
* Check that union Jinja filter can be chained

* set filters: fix unexpected templating type error

this error occurs with Jinja 2.10 since 32ec69d827,
for example when union filters are chained:

$ ansible all -i localhost, -mdebug -a"msg={{ []|union([])|union([]) }}"
localhost | FAILED! => {
    "msg": "Unexpected templating type error occurred on ({{ []|union([])|union([]) }}):
            unsupported operand type(s) for +: 'set' and 'list'"
}
6 years ago
Remo Wenger 83e584577a docker_container: ambiguous parameter "stop_timeout" (#43874)
* docker_container: Honour stop_timeout when creating docker containers (#43814)

* Adjusting description to what actually happens.

See docker-py changelog for 2.7.0: 'APIClient.stop will
no longer override the stop_timeout value present in the
container’s configuration.'

* Add a test whether stop_timeout can be configured for the container.

* Added changelog.

* Integrate with comparisons (by default, ignore stop_timeout value for restarts; will be configurable with PR ansible/ansible#44789).

* Fix config change code and tests (#2)

* Improving wildcard test.
* Using correct config.
6 years ago
Sam Doran 8b1ae30e2e
Use bytes rather than native string for result (#46281)
This prevents a stack trace in Python 3 when the result is an empty file since
the file is open in binary mode and a native string in Python 3 is str,
not bytes.
6 years ago
Dag Wieers 84437855c9 Add integration tests
By checking the cmd result with the original we cause these tests to
fail on older releases without this PR.
6 years ago
Metzger, Simon 00d78d7ef3 added period in description. Changed integration test to work correctly. 6 years ago
Metzger, Simon 285af0b6fb added parameter leaf_port_blk_description in module and integration tests 6 years ago
Metzger, Simon be2c73ac18 be compliant to pep8 and pylint. Added integration tests. 6 years ago
Felix Fontein 84682464c7 docker_container: allow to configure comparison for existing containers (#44789)
* Added comparison configuration.

* Improving user feedback on specifying a wrong option.

* Avoid bare except.

* Added basic integration tests.

* Adding wildcard support.

* Warn if ignore_image=yes is overridden.

* Added changelog fragment.
6 years ago
Matt Clay 04ddadd89b Move module tests using TQM to integration tests. 6 years ago
Felix Fontein a727a1ee67 [aws] route53 module: fix idempotency for CAA records (#46049)
* Fixing record order for CAA records to properly handle idempotency.

* Add integration tests that reproduce CAA failure
6 years ago
Kevin Subileau ac9d506a61 win_nssm: tests and several bug fixes (#44755)
* win_nssm: add failing tests for issue #44079

* win_nssm: use Run-Command instead of Invoke-Expression to prevent interpretation issue

Fix #44079

* win_nssm: add more failing tests

These tests highlight several issues with this module:
 * Service not started when state=started
 * Errors with app_parameters (see #25265)
 * Exception when passing several dependencies separated by comma as specified in doc

* win_nssm: fix service not started when state=started

Nssm status returns a multiline output that doesn't match any of the strict patterns in the switch statement.

* win_nssm: fix incorrect separator in doc for service dependencies

The dependencies parameter works with space as separator, but not with comma as shown in the documentation

* win_nssm: fix error with app_parameters parameter

Fix #25265

* win_nssm: add idempotence tests

* win_nssm: fix several idempotence issues and misbehaviors

Add missing space between arguments when app_parameters contains several keys.
Use Argv-ToString and Escape-Argument to improve arguments handling (parameters with quotes, backslashes or spaces).

* win_nssm: test parameters with spaces, quotes or backslashes

* win_nssm: restore comma as separator for service dependencies

Revert commit ddd4b4b

* win_nssm: restore support of string as dict form for app_parameters and remove support of literal YAML dict

* win_nssm: wrong variable in tests
6 years ago
Yunge Zhu 69594c5370 add azure_rm_cdnprofile and azure_rm_cdnprofile_facts (#45097)
* add cdn profile with facts

* fix merge issue

* fix version

* fix lint

* move cdn client out of azure_rm_common

* fix lint

* fix helper

* fix code bug

* fix bug

* fix import

* fix typo

* fix test
6 years ago
tstoner b427499e3e Added feature facts to nxos_facts (#45934)
* Added feature facts to nxos_facts

* Fixed ansibot indentation

* Resolved ansibot whitespace missing after ','

* Per PR suggestion, created method in base class to gather switch config
and store in global variable to prevent multiple calls to switch.

* Addressed ansibot blank line & whitespace after ,
6 years ago
Jordan Borean 40379b76b1
skip installing linux-image-extra in CI as it shouldn't be needed (#46101) 6 years ago
Dan f20938788a fixed nxos_aaa_server_host issue with type 7 encrypt key (#46015)
* fixed nxos_aaa_server_host issue with type 7 encrypt and added test cases

* added idempotence tests
6 years ago
Dan a6c20488d3 Add ospf net type (#45904)
* Added ospf network type option to nxos_interface_ospf module

* Added documentation and example for the 'network' parameter

* adding version
6 years ago
tstoner e74e8b8e75 Additional feature enhancements to nxos_logging (#45844)
* Various changes to nxos_logging.  Plus added purge capibility.

* Made a few new nxapi_logging test cases conditional based on version
and/or platform.

* Addressed PR comments and ansibot shippable.  Fixed up nxos_logging documentation format.

* Addressed ansibot shippable issues with whitespaces and documentation.

* Resolved ansibot codestyle trailing whitespace
6 years ago
Jordan Borean e26861435f
async tests: add stability (#46100) 6 years ago
Felix Fontein 7caf70db42 docker_container: fix various idempotency problems and non-working options (#45905)
* Sorting args.

* Doing comparisons of options with container parameters in a more context-sensitive way.

This prevents unnecessary restarts, or missing restarts (f.ex. if parameters are removed from ``cmd``).

* Make blkio_weight work.

* Fix cap_drop idempotency problem.

* Making groups idempotent if it contains integers.

* Make cpuset_mems work.

* Make dns_opts work.

* Fixing log_opts: docker expects string values, returns error for integer.

* Adding tests from felixfontein/ansible-docker_container-test#2.

* Make uts work.

* Adding changelog entry.

* Forgot option security_opts.

* Fixing typo.

* Explain strict set(dict) comparison a bit more.

* Improving idempotency tests.

* Making dns_servers a list, since the ordering is relevant.

* Making dns_search_domains a list, since the ordering is relevant.

* Improving dns_search_domains/dns_servers.

* Fixing entrypoint test.

* Making sure options are only supported for correct docker-py versions.
6 years ago
Abhijeet Kasurde 905acd7c9e
VMware: vmware_inventory contrib testing (#42879)
* VMware: vmware_inventory contrib testing
* Use python.py to run inventory script during test.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
Sloane Hertel 18dc928e28
Fix and re-enable sts_assume_role integration tests (#46026)
* Fix the STS assume role error message assertion when the role to assume does not exist.
6 years ago
Matt Clay 7d8f1a7aae Disable failing sts_assume_role integration test. 6 years ago
Matt Clay 339d22a2bd
Improve stability of Docker integration tests. (#46005) 6 years ago
tstoner 216da1c475 Changed when condition from checking image version to checking keys being (#45943)
defined
6 years ago
Jordan Borean 27c10fa502
add skip/docker alias to skip tests when running on Docker (#45955)
* add skip/docker alias to skip tests when running on Docker

* changed warning message wording
6 years ago
Jordan Borean 198423d6fb
powershell: do not quote join_path result to reflect ShellBase join_path (#45944) 6 years ago
Andrew Gaffney acac001742 Add number of skipped tasks to play recap in 'default' callback (#45797) 6 years ago
Jordan Borean 5c73d4f4bd
async: use async_dir for the async results file directory (#45461)
* win async: use async_dir for the async results file directory

* tried to unify POSIX and PowerShell async implementations of async_dir

* fix sanity issue
6 years ago
Zim Kalinowski 83645963fb Fixing assigning ssl certificate to http listener in app gateway (#45830)
* fixed ssl certificate reference

* modified test
6 years ago
Zim Kalinowski 16fa49a894 adding os disk name (#45126)
* adding os disk name

* fixed test
6 years ago
Daniel Speichert d34cf93f1a Migrate from MySQLdb to PyMySQL (#40123)
* Migrate from MySQLdb to PyMySQL

* Deduplicate driver loading and failure message

* Explain requirements

* Apply requirements docs change to proxysql too

* Add changelog
6 years ago
Pilou 60160c1e90 doc: exercising module code locally: update cmd (#45697)
The documented way to execute module code locally wasn't always working:

    $ python ./lib/ansible/modules/files/file.py <<< '{"ANSIBLE_MODULE_ARGS": {}}'
    Traceback (most recent call last):
      File "./lib/ansible/modules/files/file.py", line 177, in <module>
        from ansible.module_utils.basic import AnsibleModule
      File "~/ansible/lib/ansible/module_utils/basic.py", line 78, in <module>
        import tempfile
      File "~/ansible/lib/ansible/modules/files/tempfile.py", line 69, in <module>
        from tempfile import mkstemp, mkdtemp
    ImportError: cannot import name 'mkstemp'
6 years ago
Felix Fontein 6e04a1dbdc integration tests for docker_container (#45747)
* First round of integration tests for docker_container.

* Added regression test for #45700.

* Work around dict order randomization.
6 years ago
Matt Clay 846ee7e85f Fix issues with docker_stack test:
- Leave swarm at end of test to avoid breaking docker_swarm test.
- Do not update stack to avoid error leaving swarm.
- Put test back in correct group.
6 years ago
Julien PRIGENT 6059246093 EFS - add support for new Provisioned Throughput (#43253)
* efs.py: Add support for EFS provisioned throughput

* efs_facts.py: Add support for EFS provisioned throughput

* efs_facts integration tests updated with provision throughput

* efs_facts: Tests refactoring - add failure and success playbook according to botocore version.

* efs_facts: More tests and new option descriptions adjustment

* efs_facts tests renamed to efs
6 years ago
Matt Clay 06e2e0e040 Change group on docker_stack test.
This should provide a temporary fix for conflicts with the docker_swarm test.
6 years ago
Dario Zanzico 54c3d1c24e New module: add docker_stack module (clound/docker/docker_stack) (#24588)
* add docker_stack module + tests
6 years ago
Will Thames d2569a3f7d Improve iam_group exception handling (#45599)
* Improve iam_group exception handling

Use AnsibleAWSModule for iam_group and handle BotoCoreErrors
as well as ClientErrors. Use fail_json_aws to improve error messages

* Add minimal iam_group test suite

Update some of the read-only IAM permissions (this is not sufficient
to run the test suite but it gets further than it did until it tries
to add a (non-existent) user)

* Clean up after tests
6 years ago
Sloane Hertel d7ca3f2bd3 ec2_group: fix regression for targets that are a list containing strings and lists (#45594)
* Fix targets that may be a list containing strings and lists which worked prior to 2.6.

* Add ec2_group integration tests for lists of nested targets

* changelog

* Add diff mode support for lists of targets containing strings and lists.
6 years ago
David Passante 05328ebf21 Cloudstack: fix support for some VPC service capabilities (#45727)
* Fix support for VPC capabilities such as redundant routers or region level VPC

* Add integration test cases for "region level VPC" and "distributed router" capabilities
6 years ago
Pilou 9984c0fd40 hashi_vault lookup: add integration tests (#44814)
* hashi_vault lookup: add integration tests

* hashi_vault lookup tests: use ansible-ci-files
6 years ago
Zim Kalinowski df768914a1 adding sql firewall rule facts (#45059) 6 years ago
Jordan Borean d81249994e
win_script: add support for become and centralise exec wrapper builder (#45582)
* win_script: add support for become and centralise exec wrapper builder

* satisfying the pep8 gods

* do not scan for module dependencies when running as a script
6 years ago
Anil Kumar Muraleedharan ac58c36ad0 Lenovo cli bugfixes (#45278)
* To change all CLIs present in the code to latest CNOS CLI. One bug of executing with Lenovo Jakku switch is also getting fixed.

* To change the file names as the commands have changed from display to show

* To change to new CLI in test_cnos_comand.py as well
6 years ago
Dag Wieers cbf2c2a000 Fix integration tests (#43847)
I doubt this is the correct test, but until we have this fixed/improved
at least this works fine.
6 years ago
Zim Kalinowski 111febe62e extended vmss facts (#45535) 6 years ago
Deepak Agrawal 81214409cf
asa_config/ios_config: diff strict does not work with multiple parents (#45150)
* multiple parents issues in diff

* Integration tests for missing functionality

* add testcase for other platforms. vnxos does not support qos so need to find a command chain on v-nxos for multiple parets. junos uses on-device diff so should not need this.

* Fix for issue when any candidate parent did not meet the exact line in running-config

* DCI runs eos_config without become flag
6 years ago
Matt Martz 5785de582f
Fix logic to not re-download existing files when force=no (#45495)
* Fix logic to not re-download existing files when force=no. Fixes #45491

* Reduce logic complexity
6 years ago
David Rodríguez 600c7ac108 Fix remote checksums when paths have leading dots (#45287)
* Fix remote checksums with paths have leading dots

* Fix result recorded from the wrong file

* Add changelog fragment
6 years ago
Yuwei Zhou fa04387550 fix the autoscale resource id (#45477)
* fix the autoscale resource id

* Update main.yml
6 years ago
Zim Kalinowski 8a221d81dd fixing facts for mysql server (#45374) 6 years ago
Jordan Borean 01398f61d5
Win deprecate 2.8 (#45473)
* Remove deprecated/expired functionality

* win:_msi: Remove the win_msi module

* removed some missed deprecated return options and added porting guide reference

Co-authored-by: dagwieers <dagwieers@users.noreply.github.com>
6 years ago
Jordan Borean ec6d82435f
win_scheduled_task: add deprecation warning for repetition format (#45468)
* win_scheduled_task: add deprecation warning for repetition format

* fixed up sanity issues
6 years ago
Jordan Borean 881f3a599c
windows testing - changes to accomodate future behaviour changes (#45464) 6 years ago
Zim Kalinowski 0b029d6792 adding tags support to postgresql (#45339) 6 years ago
Jordan Borean d4ce1b9f31
fix Ansible.ModuleUtils.FileUtil to respect ErrorAction if running in a try/catch (#45451) 6 years ago
Jordan Borean c9c141fb6a
win_say - fix up syntax and test issues (#45450) 6 years ago
Jordan Borean 25ae4f2b73
reordered windows test groups for better efficiency (#45445) 6 years ago
Matt Clay ed49f37957 Reduce cost of Azure DB tests. 6 years ago
Matt Martz 0015d4cef3
2.8 Core Deprecation Removal (#45232)
* Remove deprecated ansible.vars.unsafe_proxy. Fixes #45040

* Remove deprecated validate_md5 alias from fetch module. Fixes #45039

* Remove deprecated private arg from import/include_role. Fixes #45038

* All include deprecations bumped to 2.12. Fixes #45037

* Add changelog for deprecated removals
6 years ago
Zim Kalinowski e203531735 fixing broken sql server tags (#45378) 6 years ago
Matt Clay 75d1cb3b05 Fix tower_project integration test.
Changes required due to https://github.com/ansible/ansible/pull/45158
6 years ago
Kevin Breit 6c67674eab meraki_mr_l3_firewall - Integration test fix (#45366)
* Fix integration test as wrong module was called

* Create block section for failures on integration test for mr_l3_firewall integration test
6 years ago
Will Thames 1463c2e4a8
Use a sensible default for k8s merge_type (#45284)
* Use a sensible default for k8s merge_type

The sensible default for merge_type is `['strategic-merge', 'merge'].
However, we can't make this the default default, as we need to support
users who are using openshift 0.6.0, where the merge_type parameter is
unsupported.

* Refactor k8s test suite for merge_type tests

Allow tests with pre-merge-type openshift and post-merge-type
openshift.
6 years ago
jctanner ab133def0b vmware_guest test - Use the cluster name instead of the path (#45368) 6 years ago
Alexander Bethke a3a189fc83 Add integration tests for flatpak_remote module
PR #42315
6 years ago
Meecr0b 2f6b8591b1 tower_credential: expect ssh_key_data to be a string instead of path (#45158)
* expect ssh_key_data to be a string instead of path

ssh_key_data should be a string filled with the private key
the old behavior can be archived with a lookup

Fixes #45119

* clarifies ssh_key_data description, adds newline
6 years ago
Alexander Bethke 19acd5d4f7 Add integration tests for flatpak module
PR #42169
6 years ago
Matt Martz 2ac647def8
Ensure loop with delegate_to can short circuit the same as without delegate_to. Fixes #45189 (#45231) 6 years ago
Pieter Avonts 1a810f8f11 VMware: Rewrite get_resource_pool method for correct resource_pool selection (#39792)
* rewrite get_resource_pool method for correct resource_pool selection
* only keep name if path is given for cluster, esxi_hostname or resource_pool
* Revert "only keep name if path is given for cluster, esxi_hostname or resource_pool"
* This reverts commit 50293ec763c024b0eaceac5d775ccc0ad3ff8bd7.
* if the name argument contains a path, only use the last part for matching
* remove path from cluster argument in tests
* remove find_objs in favour of reusing find_obj with an extra folder argument
* fix find_obj ignoring first if name is not given
6 years ago
Abhijeet Kasurde fd985db72d
VMware: Refactor disc logic (#39285)
* Refactoring related to network device
* Assign unique random temporary key while creating SCSI or/and IDE controller devices
* Add testcase for this change

Fixes: #38679

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
Zim Kalinowski fca1dc4cf2 consolidating dns recordset tests (#45331) 6 years ago
Zim Kalinowski d309530bb6 consolidate availabilityset tests (#45327) 6 years ago
Zim Kalinowski 8adc7901ed consolidate dnszone tests (#45328) 6 years ago
Abhijeet Kasurde e653a93044
VMware: update vmware_local_role_manager with action (#44566)
With this fix user can add, remove and set privileges to
an existing role with privileges.

Fixes: #44391

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
Sloane Hertel 8b341619ae Fix backwards compatibility without providing prefix since boto3 does more parameter validation than boto (#45308)
Use .get() instead of assuming a rule has a Transitions or Filter key (both of which are optional)
6 years ago
Ryan Brown 079299db4d
[aws] ec2_group multi-account and peered VPC bugfix (#45296)
* Add tests to replicate bug #44788 

* Handle when userId is same account due to in-account peering

* Module defaults for main.yml

* Turn off VPC peering tests in CI
6 years ago
Ganesh Nalawade a3c137c1ab
Fix diff_ignore_lines option issue for candidate configuration (#45201)
* Fix diff_ignore_lines option issue for candidate configuration

*  diff_ignore_lines option is to handle the running config fetch from
   remote host and ignore the lines that are auto updated eg: commit time and date
*  This option should not be used while processing candidate (input) configuration

* Fix review comment
6 years ago
Adam Miller db34d3923a Improve dnf group output for clarity
Add note about group removal bug upstream dnf

Signed-off-by: Adam Miller <admiller@redhat.com>
6 years ago
Deepak Agrawal 23d54ed1d4
iosxr dci failure on devel/2.7 (#45268) 6 years ago
Yunge Zhu 2955d7cd1b add publish url in webapp facts output (#45131)
* add publish url in webapp facts output

* update name

* fix test
6 years ago
Ryan Brown 20f21779d3
Fix ec2_group for numbered protocols (GRE) (#42765)
* Fix spurious `changed=True` when int is passed as tag

* Fix for all AWS module using compare_aws_tags

* Handle improperly stringified protocols and allow inconsistency between None/-1 on non-tcp protocols

* Add integration test that reproduces the same bug

* Return false if the comparsison is not equal
6 years ago
Zim Kalinowski 0ad262e3ec Consolidate keyvault tests (#45196) 6 years ago
Zim Kalinowski a5e2b60870 adding tags to keyvault (#45145) 6 years ago
Abhijeet Kasurde 9c1ba18607
VMware: Return Disk UUID information (#45157)
This fix adds feature of disk uuid for given virtual machine disk.

Fixes: #45149

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
Zim Kalinowski d4aa7db323 consolidate sql tests into one (#45064) 6 years ago
Zim Kalinowski 1f8635fbd9 Virtual machine facts - retrieving instance view (#45128) 6 years ago
Zim Kalinowski 9bd702ef37 vm size idempotence (#45108) 6 years ago
Madhura-CSI a4663d8e73 New module for azure custom image facts (#42102)
* new module for azure custom image facts

* added facts in aliases, corrected assertion

* simplified managed disk id struct

* updated ansible version
6 years ago
Dag Wieers e99db084f4
aci_interface_policy_leaf_policy_group: Fix filtering by lagT (#45088) 6 years ago
Dag Wieers 6faf400621
aci_switch_policy_vpc_protection_group: Fix idempotency (#45091) 6 years ago
Zim Kalinowski 5c9241fa7c merge mysql server and database tests (#45060) 6 years ago
Zim Kalinowski 9b28319020 adding container instance facts (#43326) 6 years ago
Yunge Zhu 107ae1a4f3 improve vmss test (#44892)
* improve vmss test

* fix lint

* fix lint

* fix lint

* fix  test bug
6 years ago
Zim Kalinowski d8cf645a8c merging postgresql server and database facts (#45061) 6 years ago
zikalino 0ee598a710 added missing public ip address alias 6 years ago
Anil Kumar Muraleedharan fbf55a09cc Lenovo image refactor (#44953)
* Refactoring code to adhere to persistence connection.

* Update cnos_rollback.py

* Updating license for the refactored method

* Update cnos_rollback.py

* Removing the BSD License as suggested by Legal

* Adding cnos_image after testing on sftp. Test code is also added

* Removing debug comments

* adding space
6 years ago
Ganesh Nalawade 005233f814
Fix iosxr_config integration test failure (#44969)
*  Check for commands presence in case running config
   is used as base config for diff
*  Correct the fixtures
6 years ago
Matt Clay 1b54af068d Disable azure_rm_virtualmachine_scaleset test.
Temporary solution to avoid quota issues.
6 years ago
Matt Clay debc1e229e Split Azure tests into 8 groups. 6 years ago
Nilashish Chakraborty 0f268e70a1
Fix ios_user issues (#44904)
* Fix ios_user issues

* Modify regex and fix unittests
6 years ago
Ubuntu 7d81de2516 updates to azure_rm_sqlfirewallrule
updates to azure_rm_sqlfirewallrule

small fixes

move sql client to common

adding state

fixed sample

fixed sanity

fixed aliases

removed unnecessary object

removed unused resource_group

changed group to less crowdy

tags

no tags on firewall rule
6 years ago
Yuwei Zhou b7d614df78 add auto scale module (#41533)
* add autoscale modules

* add test alias
6 years ago
Yunge Zhu f6fa5a11bb azure vm test: async second vm deletion (#44887)
* async second vm deletion

* fix typo

* random resource names, comment out disable steps

* fix syntax

* fix syntax error again

* fix test

* fix typo
6 years ago
Roman Belyakovsky 4f70eb3e26 ec2_vol_facts: moved to boto3 (#43348)
* ec2_vol_facts: moved to boto3

* vol_facts: formatting fixes

* vol_facts: formatting fixes

* vol_facts: added integration tests

* vol_facts: improved integration tests

* vol_facts: integration tests, fixed ami

* vol_facts: integration tests, fixed ami

* vol_facts: refactor, post-review update

* vol_facts: implemented pagination

* vol_facts: pep8 style fix

* CI IAM policy requirements fix

* Tests fixed, added to unsupported, removed empty files

* removed shippable alias
6 years ago
Zim Kalinowski 59a302152a added missing alias in container registry tests (#44936) 6 years ago
Richard Levenberg c759381b0b win_xml module for manipulating XML files on Windows (#26404)
documentation fixups

handling backup in a more ansible canonical way

remove quotes from $dest

Handle elements with only text child nodes
6 years ago
Sloane Hertel 113336d6f1 rds_instance module and tests (#43789)
* Add functions to retrieve the allowed and required parameters for boto3 client methods

* Add custom waiter for stopping an RDS DB instance

* Add rds_instance module

* Add rds_instance integration tests

* address requested changes from ryansb

* address requested changes from willthames

* address requested changes from dmsimard

* Fix final snapshots

Fix idempotence with already-deleting DB instances

Remove unused import from module_utils/aws/core.py

Consolidate function to get all boto3 client method parameters and the subset of required parameters

* Add some additional rds_instance integration tests

* Add some common functions to module_utils/aws/rds

* Move common code out of rds_instance

* Remove hardcoded engine choices and require the minimum boto3

* Document wait behavior

* Provide a list of valid engines in the error message if it is invalid

Add supported methods to whitelist

Remove AWSRetry around waiter

Wait for a less crazy amount of time

Remove unused variables

* Add a test for an invalid engine option

* pep8

* Missed adding a method to the whitelist

* Use retries

* Fix some little things

* Fix more things

* Improve error message

* Support creating cross-region read replicas

* Remove unused imports

* Add retry when getting RDS instance

* Soft-check required options so module fails properly when options are missing

* Fix mariadb parameter version

* Fix cross-region read_replica creation and tests

* fix modify tests

* Fix a modification test

* Fix typo

* Remove test for option_group_name that exists for this account but may not for others and added as a TODO to do properly
6 years ago
Dag Wieers dbe30cc050
win_wait_for_process: Fixes and integration tests (#44801)
* win_wait_for_process: Add integration tests

* Disable reporting changes

* Added more tests checking PID

* Various improvements

This PR includes:
- Use Get-Process instead of CIM Win32_Process
- Rewrite of process filter logic (speedup)
- Fix error messages
- Fixes to documentation, examples and return output

* win_wait_for_process: Limit to PowerShell 4 and higher

* Improve RESULT documentation

* Last minute fixes for CI

* Catch Powershell exceptions

* Increase timeout to make tests more stable
6 years ago
Will Thames ce110ff081 K8s retry merge (#44821)
* Make merge_type a list and apply merge_type in order

Allow use case of preferring strategic-merge and failing
back to merge, or just preferring a different merge type

* Improve k8s module test coverage
6 years ago
Matt Martz 2a4e92aab7
ensure if we get a non-Task object in _get_delegated_vars, we return early (#44934) 6 years ago
Matt Martz a0d7d4b82f Change insertion order of apply block to not affect the include_X task itself (#44912) 6 years ago
Matt Martz 9d89e15ff0
Ensure we only cache the loop when the task had a loop (#44901)
* Further restrict caching of loop when the task actually had a loop. Fixes #44874

* Extend tests for loop caching
6 years ago
Matt Clay 4b9c2cb97d
Prototype test for ansible-runner. (#44803)
* Prototype test for ansible-runner.

Based on https://github.com/ansible/ansible/pull/44746

* Limit test to RHEL 7 and CentOS 7.
6 years ago
yaakov kuperman 6b7ea5078f [aws] New module: elb_target_facts (#43565)
* initial source of the elb_target_facts module, which gathers all
registered ELBv2 target groups for a given instance id

* updating

* initial dump of tests

* updating docs, adding AWSRetry decorators

* updating tests

* More brush up, some refactoring

* updating for sanity tests

* removing extra space

* updating elb_target_facts to use a new name for the return value, not return a fact, and use instance variables for the AWS connections.  updating tests to go along with that

* updating classes to be 'new-style' classes
6 years ago
Will Thames 0c22c0cefb Add delete_on_termination to all EC2 root volumes (#44818)
Not terminating volumes on instance deletion causes
unwanted costs
6 years ago
Dag Wieers bf9ed0263a Ensure action plugins accept only valid args (#44779)
* Ensure action plugins accept only valid args

This fixes #25424
This also fixes #44773

* Add missing parameters, use private _VALID_ARGS
6 years ago
Zim Kalinowski bd866ed69a adding container registry facts (#43325) 6 years ago
Yunge Zhu b731732616 add azure_rm_webapp_facts module (#43631)
* add webapp facts module

* remove certified

* remove useless argument

* add tests

* return curated output

* add description of return value, move test to webapp folder

* fix lint

* fix lint

* fix lint

* fix test

* fix bug

* fix test, will get all webapp with same tag created by previous test

* fix test

* fix test

* fix test

* add properties description, refine return name

* refine properties, add request_id when exception

* fix bug

* update doc, add publish profile

* fix error

* flatten properties, add option for return publish profile
6 years ago
Zim Kalinowski 3b5b15ee5a
Adding azure_rm_virtualmachine_facts to azure_rm_virtualmachine test alias (#44881)
* add virtual machine facts to virtual machine test

* removed empty line
6 years ago
Hai Cao ccb7909cc5 [new module] Azure Traffic Manager profile module (#43812)
* add traffic manager client and models in azure_rm_common
- add traffic manager management client
- import traffic manager models to 'traffic_manager_models' proprety
- azure.mgmt.trafficmanager doesn't have models(), so use direct import
for now

* add traffic manager facts module

* add traffic manager module

* add integration test for two modules

* fix package info in requirements

* fix sanity check

* fix monitor config default value

* fix facts module doc

* move model import into module

* resolve comments except seprating endpoint

* remove endpoint operation

* fix test after removing endpoint operation

* change module name to azure_rm_trafficmanagerprofile/facts

* fix sanity test

* seperate endpoint into delegate module

* fix typo

* fix lint

* fix lint

* fix test

* fix test

* resolve comments

* fix test

* fix test

* fix test

* fix bug in return

* resolve comments

* fix lint

* fix lint

* add sample in endpoint module
6 years ago
Matt Clay 78bd020429 Remove obsolete `test/utils/docker/` directory. 6 years ago
Jasper Aorangi 2541a8c494 azure_rm_virtualmachine: Add 'accept_terms' for accepting terms when deploying paid marketplace images (#44701)
azure_rm_storageaccount: Add 'StandardSSD_LRS', and choices to correct unrelated sanity error
6 years ago
Anil Kumar Muraleedharan 4b2495a54c Lenovo integration test roles 1 (#44559)
* Integration test suit for cnos_facts, cnos_config, cnos_command, enos_facts, enos_config and enos_command.

* Update all_facts.yaml

* Update invalid_subset.yaml

* Update not_hardware.yaml

* Adding cnos_backup, cnos_bgp, cnos_conditional_command, cnos_condtional_template, cnos_ethernet, cnos_portchannel, cnos_rollback.

* Update README.md

* Adding the sample roles for cnos_save, cnos_show_run, cnos_template, cnos_vlag and cnos_vlan
6 years ago
Matt Clay cac51e6da8 Restore repos after zypper_repository test runs.
This also allows the test to run on newer containers by not
manipulating any of the pre-configured repositories.
6 years ago
Adrien Fleury 4249c5ca7f New module : tower_credential_type (#37243)
* Add new module *tower_credential_type*

* Add support for credential type creation and/or deletion
* Add test coverage for tower_credential_type
6 years ago
Adrien Fleury aaa157f140 New module tower_workflow_template. (#37520)
* Add new module *tower_workflow_template*

Manage Tower workflows and their schemas.
6 years ago
Ganesh Nalawade eb9c75caad
Fix rollback option in cli_config module (#44834)
* Fix rollback option in cli_config module

* Update rollback flag in cliconf plugins
* Add rollback api for junos cliconf plugin

* Update doc

* Update doc
6 years ago
Jordan Borean 9d91607754
win_psexec: fix arg handling when command contains multiple args (#44797) 6 years ago
Yunge Zhu 2bd0a66c08 start/stop/restart azure webapp (#44498)
* add webapp start/stop/restart

* disable test with facts

* fix lint

* fix lint

* fix check mode

* rename power_action to app_state

* refine names of choices

* fix renaming bug
6 years ago
René Moser 8979af45a5
test: cs_template: fix missing cross_zone in tests (#44794) 6 years ago
Adam Miller 1e3b927a73 Improve error condition handling for dnf module (#44770)
- Fix comma separated list handling for package names
- Fix error message for unavailable/unknown package install attempt
- Fix pkg install result output generation

Signed-off-by: Adam Miller <admiller@redhat.com>
6 years ago
Jordan Borean 0c3216c565 win_reboot: fix minor issues with the latest refactor (#44740)
* win_reboot: fix minor issues with the latest refactor

* Always return elapsed with win_reboot
6 years ago
René Moser dd953dbe96
cs_template: implement update and revamp (#37015) 6 years ago
Michael Price 70fd1ec130 Define module for NetApp E-Series iSCSI targets (#40632)
Create a new module for managing E-Series iSCSI targets.
6 years ago
Michael Price 054b87acb8 Define module for managing E-Series email alerts (#42643)
Email alerts can be enabled for an E-Series system to provide
information to interested users by email when a warning or critical
level event occurs on the system. This module will allow a system owner
to configure whether or not system alerts are enabled, and who will
receive them.
6 years ago
Michael Price 97157cf876 New module for managing NetApp E-Series iSCSI Interfaces (#39877)
* New module for NTAP E-Series iSCSI Interfaces

Define a new module for configuring NetApp E-Series iSCSI interfaces.

* Improve netapp_e_iscsi_interface integration tests

Restructured integration test to set all iscsi ports to disabled, then
defines the ports either statically or with dhcp, next updates the ports
with the other definition type (static <-> dhcp), and lastly disables
all ports.  Each netapp_eseries_iscsi_interface call is verified with the
array.
6 years ago
Alex Stephen d38bccfc3e New GCP Module: gcp_compute_router (#42796) 6 years ago
Michael Price f781f341a2 Define NetApp E-Series ASUP module (#41153)
* Define NetApp E-Series ASUP module

ASUP, or Auto-Support, is a mechanism that allows NetApp support
to receive information on the status of E-Series storage-systems
in order to proactively resolve issues for customers. This module
gives customers the ability to tune ASUP settings to their liking,
including disabling the feature entirely.

* Improved testing for netapp_e_asup module

Added coverage and validation to asup integration and unit testing
6 years ago
Jasper Aorangi 56ea56f2b5 azure_rm_networkinterface: Feature/dns servers (#43588)
* Working through tests and fixing dumb mistakes

* Fix sanity issues and tests. All G

* Correct type test for azure_rm_networkinterface

* azure_rm_networkinterface correct type comparison

* Post rebase cleanup

* Remove erroneous reference to dns_servers
6 years ago
Alex Stephen 0972d37872 New GCP Module: gcp_spanner_database (#42799) 6 years ago
Alex Stephen 48de2cf214 New GCP Module: gcp_spanner_instance (#42800) 6 years ago
Alex Stephen 6d548d405b New GCP Module: gcp_sql_user (#42803) 6 years ago
Alex Stephen e9c9ccc561 Bug fixes for gcp_dns_resource_record_set (#42832) 6 years ago
Alex Stephen 473b6dbe8a New GCP Module: gcp_sql_instance (#42802) 6 years ago
Alex Stephen 26cf8fafb5 New GCP Module: gcp_sql_database (#42801) 6 years ago
Michael Price 1f2ae0d4cd Define a module for managing E-Series settings (#41010)
There are multiple settings that are defined at a global level for
E-Series systems, but don't necessarily fit with anything else. This
module is intended to provide a place to encapsulate those.
6 years ago
Abhijeet Kasurde fe8af27e5d
VMware: new module: vmware_host_ntp_facts (#44306)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
Yunge Zhu d5cbb53f5a fix linux webapp java framework bug (#44753)
* fix linux web app java linux_fx_version

* fix lint

* fix test

* resolve comments
6 years ago
Zim Kalinowski 289be02224 Revert "fix linux web app java linux_fx_version (#44715)" (#44750) 6 years ago
Yunge Zhu 661172ab40
fix linux web app java linux_fx_version (#44715) 6 years ago
jainnikhil30 884c74a6c5 Add 'tower_settings' module for managing Ansible Tower Settings (#43933)
* add the tower_settings module
6 years ago
Matt Clay 22d5f5d97f Get packages for dnf and yum tests from S3. 6 years ago
Matt Clay 83fd82ca7e Download hello package from S3 for apt test. 6 years ago
Adam Miller 397febd343 YUM4/DNF compatibility via yum action plugin (#44322)
* YUM4/DNF compatibility via yum action plugin

DNF does not natively support allow_downgrade as an option, instead
that is always the default (not configurable by the administrator)
so it had to be implemented

 - Fixed group actions in check mode to report correct changed state
 - Better error handling for depsolve and transaction errors in DNF
 - Fixed group action idempotent transactions
 - Add use_backend to yum module/action plugin
 - Fix dnf handling of autoremove (didn't used to work nor had a
   default value specified, now does work and matches default
   behavior of yum)
 - Enable installroot tests for yum4(dnf) integration testing, dnf
   backend now supports that
 - Switch from zip to bc for certain package install/remove test
   cases in yum integration tests. The dnf depsolver downgrades
   python when you uninstall zip which alters the test environment
   and we have no control over that.
 - Add changelog fragment
 - Return a pkg_mgr fact if it was not previously set.
6 years ago
Matthias Fuchs 7871027c9d Share the implementation of hashing for both vars_prompt and password_hash (#21215)
* Share the implementation of hashing for both vars_prompt and password_hash.
* vars_prompt with encrypt does not require passlib for the algorithms
  supported by crypt.
* Additional checks ensure that there is always a result.
  This works around issues in the crypt.crypt python function that returns
  None for algorithms it does not know.
  Some modules (like user module) interprets None as no password at all,
  which is misleading.
* The password_hash filter supports all parameters of passlib.
  This allows users to provide a rounds parameter, fixing #15326.
* password_hash is not restricted to the subset provided by crypt.crypt,
  fixing one half of #17266.
* Updated documentation fixes other half of #17266.
* password_hash does not hard-code the salt-length, which fixes bcrypt
  in connection with passlib.
  bcrypt requires a salt with length 22, which fixes #25347
* Salts are only generated by ansible when using crypt.crypt.
  Otherwise passlib generates them.
* Avoids deprecated functionality of passlib with newer library versions.
* When no rounds are specified for sha256/sha256_crypt and sha512/sha512_crypt
  always uses the default values used by crypt, i.e. 5000 rounds.
  Before when installed passlibs' defaults were used.
  passlib changes its defaults with newer library versions, leading to non
  idempotent behavior.

  NOTE: This will lead to the recalculation of existing hashes generated
        with passlib and without a rounds parameter.
        Yet henceforth the hashes will remain the same.
        No matter the installed passlib version.
        Making these hashes idempotent.

Fixes #15326
Fixes #17266
Fixes #25347 except bcrypt still uses 2a, instead of the suggested 2b.

* random_salt is solely handled by encrypt.py.
  There is no _random_salt function there anymore.
  Also the test moved to test_encrypt.py.
* Uses pytest.skip when passlib is not available, instead of a silent return.
* More checks are executed when passlib is not available.

* Moves tests that require passlib into their own test-function.

* Uses the six library to reraise the exception.

* Fixes integration test.

When no rounds are provided the defaults of crypt are used.
In that case the rounds are not part of the resulting MCF output.
6 years ago
Rafael ad993ca734 one_host environment variables, Fixes #44163 (#44568)
* including test case using environment variables as per issue #44163

* including missing environment variable in shared documentation fragement, related to issue #44163

* fixes parameters via environment variables, issue #44163
6 years ago
coreywan 50750c7363 Added nios_txt_record module (#39264)
* Added nios_txt_record module

Whitespace cleanup and version fix

First stab at txt record integration test

Fix for CI version requirement

Added nios_txt_record module

Whitespace cleanup and version fix

First stab at txt record integration test

Fix for CI version requirement

force re-run

* added alias for cloud group1
6 years ago
Shuang Wang b03feb6d40 Implement part of #27617 [expend checksum format to <algorithm>:(<checksum>|<url>)] (#43751)
* expend checksum format to <algorithm>:(<checksum>|<url>)

* continue to code at office

* ALPHA - expend checksum format to <algorithm>:(<checksum>|<url>)

* clean up tmpfile and comment

* try to add test code for 27617

* try to add test code for 27617

* try to add test code for 27617

* try to fix [Could not find or access 'testserver.py']

* fix test code [Could not find or access 'testserver.py']

* fix test code [add files dir]

* fix test code [files dir not exists]

* as [connection was closed before a valid response was received]

* [connection was closed before a valid response was received]

* [connection was closed before a valid response was received]

* add test item [sha1 and sha256]

* since [connection was closed before a valid response was received]

* fix [connection was closed before a valid response was received]

* fix test code typo

* add docs for #27617

* PR #43751 is minor change

* fix pep8 issue.

* fix test code style.

* fix unexpected quote
6 years ago
Michael Price ad91793428 Resolve issues in NetApp E-Series Host module (#39748)
* Resolve issues in NetApp E-Series Host module

The E-Series host module had some bugs relating to the update/creation
of host definitions when iSCSI initiators when included in the
configuration. This patch resolves this and other minor issues with
correctly detecting updates.

There were also several minor issues found that were causing issues with
truly idepotent updates/changes to the host definition.

This patch also provides some unit tests and integration tests to help
catch future issues in these areas.

fixes #28272

* Improve NetApp E-Series Host module testing

The NetApp E-Series Host module integration test lacked feature test
verification to verify the changes made to the storage array.

The NetApp E-Series rest api was used to verify host create, update, and
remove changes made to the NetApp E-Series storage arrays.
6 years ago
Trishna Guha 8b175d99c6
ignore file_pull (#44614)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
6 years ago
Abhijeet Kasurde 33f5b1aa0f
VMware: new module: vmware_local_role_facts (#44553)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
Matt Clay c2d16b754d Move azure_rm_appgateway certs into files.
This avoids ~20 minutes of runtime on the no-tests-as-filters sanity test.
6 years ago
Sam Doran 4d9218cec4 Add reboot action plugin (#35205)
* Update docs

* Add reboot action plugin

Refactor win_reboot so it is subclassed from reboot

* Use new connection methods

* Test fixes

* Use better uptime command for Linux

Use who -b to get the last time the system was booted rather than uptime, which changes every second.

* Use distribution specefic commands and flags

Query the managed node to determien its distribution, then set the appropriate command and flags.

* Tune debug messages a bit

* Update module docs with details about pre_reboot_delay

s docs

* Ensure that post_reboot_delay is a positive number

* Remove the stringification

* Add integration tests

* Make sure aliases are honored

* Handle systems that have an incorrect last boot time

SystemD and fakehw-clock do not properly set the
last boot time and instead always set it to epoch.
Use a different command if that is the case.

* Copyright and encoding fixes

* Minor fixes based on feedback

* Add exponential backoff to sucess check method

* Update integration test

Skip the integration test if it would try to reboot the control node. We need a new mechanism to account for this scenario in ansible-test, so tests must currently be run manually for this plugin.

* Update integration test

Skip the integration test if it would try to reboot the control node. We need a new mechanism to account for this scenario in ansible-test, so tests must currently be run manually for this plugin.

* Fail early with running with local connection

* Update docs based on feedback

* minor refactoring, state mgmt changes
6 years ago
Will Thames 60e3af42d5 sns_topic boto3 port (#39292)
* Port sns_topic to boto3 and add tests
6 years ago
Stephen SORRIAUX a78cc15099 Add new parameters to manage mtime and atime for file module, fixes #30226 (#43230)
* Add new parameters related to mtime and atime for file module, fixes #30226
6 years ago
Brian Coca 9cc56981b5
Add new host_pinned strategy (#44586)
The 'free' strategy still attempts to do all hosts per task before going to the next, it just doesn't wait for slow hosts,
This strategy processes each host as fast as possible to the end of the play before trying to process another host in the pool.
6 years ago
Sloane Hertel 79ecb4c41f
Add diff mode for ec2_group (#44533)
* Add (preview) diff mode support ec2_group

* Add diff mode to some ec2_group integration tests

* Remove unnecessary arguments and add comment to the module notes

* Add changelog
6 years ago
Sloane Hertel b152515fcb RDS inventory plugin (#41919)
Comments out uses of rds_instance in the integration tests and replace with AWS CLI until rds_instance has been merged
6 years ago
Dag Wieers 3d70274864
Added an async 'started' test (like 'finished') (#43445) 6 years ago
Matt Clay 18da873531 Ignore CentOS 6.10 for passwordstore test. 6 years ago
Felix Fontein 0e6234ab04 Adding module which allows to complete certificate chains (#44169)
* Adding certificate_complete_chain module.

* Avoid code smell errors.

* Removing input_chain_src.

* Make sure line ending is there.
6 years ago
Zim Kalinowski 1704c5932a adding app gateway module (#39940)
* adding app gateway module

* improved application gateway

* added register output

* subnet_output

* debugging

* dumping params

* fix dump

* fixed mapping

* fixed bug

* fixed param problem

* small fixes in code and added sample test

* fixed syntax

* fixing sanity stuff

* sanity fixes

* more sanity tests fixed

* added azure_tags

* tags

* pruning app gateway

* pruning app gateway

* string -> str

* removed type: str

* trying to add idempotency

* fixed syntax

* fix sanity

* fixed bugs

* fixed error

* disabled ssl policy check for  a while

* fixed dict comparison

* fixed syntax

* compare just http listeners & frontend ports

* fix syntax

* syntax

* syntax

* just compare sku

* fix syntax

* just http settings collections

* fixing appgw module

* make it green

* fix items issue

* compare all arrays

* fixed sanity

* adding snake_to_camel transformations

* fix

* another fix

* snake to camel

* additional snake to camel fixes

* fixed public ip address conversion

* version added is now 2.7

* changed alias

* dict_merge

* added ssl policy spec

* fixed new sanity issue

* renamed module

* fixed ssl policy translation

* added test for ssl & certificates

* updated doc

* fixed docs improved tests

* fix

* fixed test
6 years ago
Sam Doran df335d91b0
Properly un expire account on creation (#44174)
When creating a new account, check to see if the expiration parameter is negative and pass in the appropriate parameter. Since the negative integer passed into expires is converted to time.struct_time which in turn gets converted to a formatted time string when passed to the underlying command, a -1 or large negative number would result in passing a date before 1970-01-01 to the underlying command.

This had the opposite effect of creating an account with no expiration account resulting in a newly created account that was already expired, or just throwing an error on certain systems.
6 years ago
jctanner 653d9c0f87 New keyword: ignore_unreachable (#43857) 6 years ago
Pilou 2603604fd6 gather facts improvements (#44008)
* gather_subset is a list of strings

When gather_subset is an integer, a message pointing out the problem, current tb error 
is replaced by this one:

    ERROR! the field 'gather_subset' should be a list of (<class 'str'>,), but the item '42' is a <class 'int'>
...
* gathering_facts test: ensure smart gathering is on
6 years ago
Guillaume Delpierre 23e44319ce crypto: Add new module openssl_pkcs12 (#27320)
[module] Create new module to handle PKCS#12 file.
6 years ago
Ganesh Nalawade 7a4ed53d08
Fix junos cli_command integration test (#44558)
* Issue rollback command before exit from config
  mode
6 years ago
Zim Kalinowski 9788951789
Adding os_disk_size_gb parameter to Virtual Machine (#43316)
* added os disk size gb

* fixed mistake

* added os_disk_size_gb to test

* fixed test

* no default for disk size
6 years ago
Ryan Brown 4c8808ec9d
Extend `module_defaults` by adding default groups for cloud modules (#44127)
Extends `module_defaults` by adding a prefix to defaults `group/` which denotes a builtin list of modules. Initial groups are: `group/aws`, `group/azure`, and `group/gcp`
6 years ago
Yuwei Zhou fff5fb2077 Add route table and route module (#41175)
* add route module

* add test

* add table

* add  route table

* fix dict

* fix

* fix

* route  table accept no name

* add default

* fix

* fix

* fix

* fix pep

* support route table

* fix line ending

* fix pep

* fix

* fix

* set the default to 'None'

* make return value only id

* camel and snake

* set test alias

* change facts line ending

* change test

* fix

* add default

* fix

* fix line break

* remove unsafe args

* fix comment

* fix
6 years ago
Zim Kalinowski a73340ee74 adding postgresql server facts (#43328)
* adding postgresql server facts

* updating postgresql server facts, minor changes

* changed return dict to list

* fixed test

* fixed several issues

* several updates

* fixed naming

* list -> complex

* try again

* fixed mistake

* added user_visible_state to the result

* added fully_qualified_domain_name

* fixed second test

* updates

* fixed test

* updated samples in return value

* wait for postgresql server to be actually ready

* another approach for test

* second server was not created

* fixing pr comments

* fix sanity

* removed forgotten  ansible_facts
6 years ago
sdubrul 061877d584 added account_alias in the response of module aws_caller_facts (#42345)
* added account_alias in the response of module aws_caller_facts

* added comment to explain list_account_aliases

* renamed caller_identity to caller_facts as the content is extended

* created changelog

* security-policy needs the iam:ListAccountAliases for this module to work

* test now checks for the added field account_alias

* gracefully handle missing iam:ListAccountAliases permission
6 years ago
Felix Fontein 960d99a785 ACME: new helper module for ACME challenges which need TLS certs (#43756)
* Added helper module for generating ACME challenge certificates.

* Soft-fail on missing cryptography. Also check version.

* Adding integration test.

* Move acme_challenge_cert_helper from web_infrastructure to crypto/acme.

* Adjusting to draft-05.

* The cryptography branch has already been merged.
6 years ago
Felix Fontein ad0d10db0d ACME: improve tests (new Pebble version, strict mode) (#44518)
* Bump ACME test container version.

* Re-adding key rollover test.
6 years ago
Alex Stephen 261b90edc0 New GCP Module: gcp_compute_ssl_policy (#42797) 6 years ago
Alex Stephen 613a53c114 New GCP Module: gcp_compute_target_vpn_gateway (#42798) 6 years ago
Brian Coca bda074d34e
fix tempating issues with no_log and loops (#44468)
* fix tempating issues with no_log and loops

 - task is no log if any item is
 - added test cases

fixes #43294
6 years ago
Jordan Borean 6982dfc756 psrp: Added new Windows connection plugin (#41729)
* psrp: Added new Windows connection plugin

* Tweaks to connection options from review
6 years ago
Florian Apolloner 6cf341b40e Fixed hash_host option in known_hosts module. Fixes #44284 6 years ago
Matt Martz 2bf6507c44
Use newer is_sequence function instead of MutableSequence (#44331)
* Use newer is_sequence function instead of MutableSequence. Fixes #44327

* Add changelog for #44331

* Update changelog fragment to describe the fix in more detail
6 years ago
Ganesh Nalawade ce541454e9
Update netconf_config module (#44379)
Fixes #40650
Fixes #40245
Fixes #41541

*  Refactor netconf_config module as per proposal #104
*  Update netconf_config module metadata to core network supported
*  Refactor local connection to use persistent connection framework
   for backward compatibility
*  Update netconf connection plugin configuration varaibles (Fixes #40245)
*  Add support for optional lock feature to Fixes #41541
*  Add integration test for netconf_config module
*  Documentation update
* Move deprecated options in netconf_config module
6 years ago
Ryan Brown 91a16990d8 New module: Python Requirements Facts (#43108)
* New boto3_facts module

boto3_facts aims to help users see whether their python and module
versions are as expected.

* Rename to `assert_python_requirements`

* Update integration tests

* Document options

* fix imports

* boilerplate

* fix docs

* reorder import

* Make distutils optional and fail gracefully when it is not available

* fix example doc

* fix docs on requirements_facts
6 years ago
Matt Martz 617372f8c0
Mass nuke deprecated items that are easily removed. ci_complete (#44320) 6 years ago
Monty Taylor 27ac2fc67c Ensure that apt is always chosen on debian/ubuntu (#44413)
One can install alternate packages managers on debuntu machines.
However, doing so doesn't mean you want to suddenly start using them.

Add in a check similar to the fedora yum/dnf check that sets apt as the
pkg_mgr if the ansible_os_family is Debian.
6 years ago
Ryan Brown 6d52afeed6 New module cloudformation_stack_set (#41669)
* [AWS] new module cloudformation_stack_set with integration tests
6 years ago
Julien PRIGENT 3921f34253 ec2_instance.py: Add CpuOptions to EC2 (#43799)
* ec2_instance.py: Add CpuOptions to EC2

* ec2_instance_facts.py: Add CpuOptions to EC2 facts

* ec2_instance.py: LooseVersion and pylint indentation

* Implement nested cpu_options dict

* Fix botocore required version

* ec2_instance: Split integration tests to add executions with old botocore versions

* Ensure runme.sh is executable
6 years ago
Abhijeet Kasurde adf3ab5e72
VMware: Add cluster fact in vmware_vm_facts (#44292)
This fix adds an additional fact about cluster in VM facts.

Fixes: #44101

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
Fabian von Feilitzsch 519987d1b0 Revert "Disabled failing k8s integration test."
This reverts commit 9cc16ca9d8.
6 years ago
Matt Clay 9cc16ca9d8 Disabled failing k8s integration test. 6 years ago
Matt Martz 727beaf9f5 Fix invalid task attrs. ci_complete 6 years ago
Nathaniel Case b56639447f
Replace missing become: yes (#44312) 6 years ago
Alex Stephen 0c0fce7532 New GCP Module: gcp_compute_vpn_tunnel (#44051) 6 years ago
Zhikang Zhang 501503f4cb
Allow version specifiers for pip install (#41792)
Allow version specifiers for pip install.
6 years ago
Adam Miller 6d95624c22 Refactor yum and dnf, add feature parity (#43621)
* Refactor yum and dnf, add feature parity

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

* remove unnecessary module_utils, move the classes into the module code

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

* remove yum -> yum4, out of scope

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

* use ABCMeta

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

* re-arrange run() caller vs callee

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

* make sanity checks happy

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

* fix yum unit tests

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

* remove unecessary debug statements, fix typo

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

* fix licensing and attribution in yumdnf module_util

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

* include fix from PR 40737

original commit 5cbda9658a
original Author: Strahinja Kustudic <kustodian@gmail.com>

yum will fail on 'No space left on device', fixes #32791 (#40737)

During the installing of packages if yum runs out of free disk space,
some post install scripts could fail (like e.g. when the kernel
package generates initramfs), but yum would still exit with a status
0.  This is bad, especially for the kernel package, because it makes
it unable to boot.  Because the yum module is usually used for
automation, which means the users cannot read every message yum
prints, it's better that the yum module fails if it detects that
there is no free space on the disk.

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

* Revert "fix licensing and attribution in yumdnf module_util"

This reverts commit 59e11de5a2.

* move fetch_rpm_from_url out of yumdnf module_util

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

* fix the move of fetch_rpm_from_url

Signed-off-by: Adam Miller <admiller@redhat.com>
6 years ago
Zhikang Zhang d7921b4d5b
Support `--separate-git-dir` option in Git module (#41712)
Make git module support --separate-git-dir option. When git version is higher than 1.7.5, use built-in --separate-git-dir option during the clone. When lower, adjust the location of git dir manually after clone to achieve the same effect.
6 years ago
Felix Fontein a99cfc1814 New acme_account_facts module. (#44301) 6 years ago
Felix Fontein cfba02bc3b Allowing to force account URI. (#44282) 6 years ago
Abhijeet Kasurde 6caf0e8149
VMware: New module : vmware_host_ssl_facts (#43871)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
Zim Kalinowski 5f36c73fe5 adding mysql database facts (#43322) 6 years ago
Zim Kalinowski c8649f8b73 adding postgresql database facts (#43327) 6 years ago
Madhura-CSI 47cb3856b5 Support for accelerated networking and network security group for scaleset vms (#34788)
* Support for accelerated networking and network security group for scaleset vms
6 years ago
Nilashish Chakraborty d63ba5999b
Use single parameter for source-interface (#44260)
* Compress src interface into one key

* Modified regex to support varied interface types

* Fixed documentation

* Unpacking return values from splitting method
6 years ago
Yunge Zhu ee4b879328 remove unstable tag from azure tests (#44258) 6 years ago
Zim Kalinowski ac895828c1 adding mysqlserver facts (#43321) 6 years ago
Yunge Zhu aef5099695 add azure app service plan facts (#44156)
* add app service plan facts

* fix lint

* fix missed tags

* remove  azure_

* fix test random
6 years ago
Zim Kalinowski 0a9c58f866 adjusting curated response format, notification of raw format depreciation. (#43587) 6 years ago
Bjorn Hansen ff6d4e6bf4 azure_rm_common: only remove tags from new_tags if append_tags is not… (#24040) 6 years ago
Sam Doran 00e7c020b2 Add backup feature to user module (#41854)
*  Add backup option

* Only backup shadow file when the OS has one

* Only backup shadow file for SunOS

* Update docs on backup feature

* Add changelog fragment

* Add tests for shadow backup

* Remove backup option, make it automatic

Remove the option to enable/disable backups and make it automatic. Add note to docs describing this behavior.

Change tests to account for new module behavior.

Change section name in changelog fragment since minor_features is not a valid section.
6 years ago
Alex Stephen 63e87a3a0a Bug fixes for gcp_compute_route (#42820) 6 years ago
Alex Stephen f5f0d16516 Bug fixes for gcp_compute_subnetwork (#42822) 6 years ago
Alex Stephen 97b3845e89 Bug fixes for gcp_compute_url_map (#42828) 6 years ago
Alex Stephen 82678b9bac Bug fixes for gcp_pubsub_topic (#42834) 6 years ago
Alex Stephen 87c6d4be57 Bug fixes for gcp_storage_bucket (#42835) 6 years ago
Nathaniel Case 528f81a8d5
Update timeout test to match current returned string (#44191) 6 years ago
Alex Stephen cbf945d287 Bug fixes for gcp_compute_network (#42819) 6 years ago
Alex Stephen 60e78f33ce Bug fixes for gcp_compute_http_health_check (#42812) 6 years ago
Nathaniel Case 1db54dd6a1
Fix ios_user auth test ssh key usage (#44170)
* Set PasswordAuthentication=no for ios_user pubkey login

* Set ssh key to 0600 to avoid ssh failure

* Swap PasswordAuthentication for BatchMode
6 years ago
Andrew Gaffney 5708894f90 Bugfixes and integration tests for 'default' callback plugin
* display 'changed' tasks when hiding 'ok' tasks
* display proper task title for handlers (fixes #44007)
6 years ago
Felix Fontein d8d366ef37 ACME: using new acme-test-container (#44095)
* Using new acme-test-container image.

* Add test for cleaning account contacts.
6 years ago
Alex Stephen 984cc10465 Bug fixes for gcp_compute_target_tcp_proxy (#42827) 6 years ago
Alex Stephen 97006cded2 Bug fixes for gcp_compute_target_http_proxy (#42823) 6 years ago
Alex Stephen 569e094efd Bug fixes for gcp_compute_target_ssl_proxy (#42826) 6 years ago
Alex Stephen b88442064f Bug fixes for gcp_compute_target_pool (#42825) 6 years ago
Alex Stephen eaacda42f5 Bug fixes for gcp_compute_target_https_proxy (#42824) 6 years ago
Nathaniel Case d6d7b6123e
Tag prepare tasks as netconf so they can be skipped for cli-only tests (#44119) 6 years ago
Trishna Guha a8c24a5d5e
Add cli_config module (#42413)
* cli_config module

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

* rename diff and replace

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

* add nxos changes

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

* nxos tests

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

* remove severity

* address review comment

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

* add module diff

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

* add iosxr test

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

* address diff review

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

* Add junos tests

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

* vyos cliconf diff fix

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
6 years ago
Zim Kalinowski ee96d42d7d Fixing upgrade_policy idempotence (#38022) 6 years ago
Trishna Guha 43ae240431
nxos_facts test lldp feature and fix nxapi check_rc (#44104)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
6 years ago
tstoner f87b156423 NXOS NXAPI TLS & Cipher (#43651)
* Testing commands over various nxapi levels of cipher and ssl strengths.

* Reworked nxos nxapi ssl/tlv transport testing

* Added additional nxos nxapi httpapi local transport test suite

* Added meta: end_play to nxos nxapi transports task to
prevent execution unless nxos_ssl is defined.

* Refactored nxos nxapi tls and cipher options testing

* Removed blank line

* Renamed variable ssl to the more appropriate ciphers

* After each transport perumation test reset nxapi on the switch to
ensure no previous configuration is still present on the next test.

* 43651: Removed unnecessary changes to nxos_nxapi & removed hard-coded
nxapi port numbers.
6 years ago
Alex Stephen b0542217e2 Bug fixes for gcp_compute_instance_template (#42818) 6 years ago
Alex Stephen 829dcf1d23 Bug fixes for gcp_compute_instance_group (#42816) 6 years ago
Alex Stephen f977590a2a Bug fixes for gcp_compute_instance (#42815) 6 years ago
Alex Stephen 7a92b8c9ed Bug fixes for gcp_compute_global_forwarding_rule (#42810) 6 years ago
Matt Clay 56cc681d8c
Classify inventory plugins. (#44091)
* Classify inventory plugins.
* Rename inventory integration test targets.
6 years ago
Alex Stephen f405857f50 Bug fixes for gcp_compute_firewall (#42807) 6 years ago
Nathaniel Case 5a49567c71
Fix iosxr copy and delete tasks (#44083)
* Fix iosxr copy and delete tasks

* Drop local from non-smoke tasks
6 years ago
Till Maas bb85bbceeb pip: combine chdir and env only when env is set (#40793)
* pip: combine chdir and env only when env is set

This fixes an AttributeError when chdir without virtualenv is specified:

 File "/tmp/ansible_2UAFsZ/ansible_module_pip.py", line 387, in main
    env = os.path.join(chdir, env)
 File "/usr/lib64/python2.7/posixpath.py", line 75, in join
    if b.startswith('/'):
AttributeError: 'NoneType' object has no attribute 'startswith'

* Add test for pip with chdir

Signed-off-by: Till Maas <opensource@till.name>
6 years ago
Sam Doran 6d38167d49
Only template values in vars_prompt rather than all vars (#39304)
* Only template values in vars_prompt rather than all vars

This allows the use of variables in vars_prompt fields but allows variables entered in the prompt to affect play vars rather than throwing an undefined error.

Only post validate if there was a vars_prompt

* Add tests for vars_prompt
6 years ago
Zhikang Zhang b20d903cc4 Give warning if user inputs not encrypted password to user module (#43615)
* Check the password format

Check the password format and notify user if they
input unencrypted password.

* Fix sanity error

* Add integration test

* Missed a task name

* Hard code the testing password

Since some testing platfrom has no passlib installed

* Add changelog fragment

* Rework some English sentences

* Fix a grammar mistake
6 years ago
Alex Stephen fbfea59d7d Bug fixes for gcp_compute_ssl_certificate (#42821) 6 years ago
Alex Stephen c38e1e5631 Bug fixes for gcp_container_cluster (#42829) 6 years ago
Alex Stephen dd3c4b0d39 Bug fixes for gcp_pubsub_subscription (#42833) 6 years ago
Alex Stephen 3dc363d135 Bug fixes for gcp_storage_bucket_access_control (#42836) 6 years ago
Alex Stephen 7f10d432ec Bug fixes for gcp_container_node_pool (#42830) 6 years ago
Alex Stephen 7f981b4123 Bug fixes for gcp_dns_managed_zone (#42831) 6 years ago
Alex Stephen 2a346af18b Bug fixes for gcp_compute_instance_group_manager (#42817) 6 years ago
Alex Stephen c239e6f045 Bug fixes for gcp_compute_https_health_check (#42813) 6 years ago
Alex Stephen 6b5f86a4aa Bug fixes for gcp_compute_image (#42814) 6 years ago
Alex Stephen 439716a832 Bug fixes for gcp_compute_health_check (#42811) 6 years ago
Alex Stephen c8418a709b Bug fixes for gcp_compute_disk (#42806) 6 years ago
Alex Stephen 146c126780 Bug fixes for gcp_compute_global_address (#42809) 6 years ago
Alex Stephen 65df8834e8 Bug fixes for gcp_compute_forwarding_rule (#42808) 6 years ago
Alex Stephen d1399ec5a2 Bug fixes for gcp_compute_backend_service (#42805) 6 years ago
Alex Stephen 476e98e0cf Bug fixes for gcp_compute_backend_bucket (#42804) 6 years ago
Alex Stephen 4ecdf11aaa Bug fixes for gcp_compute_address (#42704) 6 years ago
Deepak Agrawal 65772ede26
Iosxr: integration test failure on devel (#44057) 6 years ago
Ganesh Nalawade 24d112fc60
Fix cli_command junos test failure and update doc (#44021)
* Fix cli_command junos test failure and update doc

*  Fix cli_command module integration test failure
   for junos
*  Update cli_command module doc for prompt and
   config command run scenario's

* Update cli_command module doc
6 years ago
Felix Fontein aef16ee195 ACME: use Cryptography (if a new enough version is available) instead of OpenSSL (#42170)
* Collecting PEM -> DER conversions.

* Using cryptography instead of OpenSSL binary in some situations.

* Moving key-to-disk writing for key content to parse_account_key.

* Rename parse_account_key -> parse_key.

* Move OpenSSL specific code for key parsing and request signing into global functions.

* Also using cryptography for key parsing and request signing.

* Remove assert statements.

* Fixing handling of key contents for cryptography code path.

* Allow to disable the use of cryptography.

* Updating documentation.

* 1.5 seems to work as well (earlier versions don't have EC sign function). Making Python 2.x adjustments.

* Changing option to select_crypto_backend.

* Python 2.6 compatibility.

* Trying to test both backends separately for acme_account.

* Also testing both backends separately for acme_certificate and acme_certificate_revoke.

* Adding changelog entry which informs about select_crypto_backend option in case autodetect fails.

* Fixing YAML.
6 years ago
René Moser 041fcb2435
cs_pod: workaround for 4.11 API break (#43944) 6 years ago
Jasper Aorangi 42257706b6 Add enable_ip_forwarding option to azure_rm_networkinterface; Fixes #43276 (#43335)
* Merge again trickily similar Accelerated networking and IP forwarding

* Add type to enable_ip_forwarding documentation

* Fix merge error

* auth to auto

* azure_rm_networkinterface: remove auth_source from tests

* azure_rm_networkinterface: remove spurious auth_source from test

* azure_rm_networkinterface: Revert formatting on test

* azure_rm_networkinterface: Correct indentation
6 years ago
John R Barker f98873bbb8
iosxr_system always syntax error (#43977) 6 years ago
Ganesh Nalawade 77bff99f3c
Fix eos_command integration test failures (#43922) 6 years ago
Deepak Agrawal 8eaebf86b6
openvswitch_db : Handle column value conversion and idempotency in no_key case (#43869)
* change column value to string. handle idempotency in no key case

* fix unit test failures in baseline
6 years ago
Matt Clay 3b693be80f Fix download URL for yum integration test. 6 years ago
Pilou 0f2d67b87f Docker integration tests: factorize setup (#42306)
* Factorize docker_secret & docker_swarm tests setup

* failure are only expected inside docker container

* docker_swarm: enable RHEL builds
6 years ago
Nathaniel Case 0f554f9208
Remove unnecessary features from cli_command (#43829)
* Remove wait_for & associated params

* Upgrade command dict to top-level, remove more wait_for accessories

* We don't need all this anymore

* Update docs

* Update tests to new argspec

* Be a little more explicit about sendonly

Also remove reference to the word provider.

* Add example of prompt and answer
6 years ago
Nilashish Chakraborty 59cd693218
Add source interface and use-vrf features (#43418) 6 years ago
Matt Clay bd0428983c Correct task args in azure_rm_managed_disk test. 6 years ago
Pilou c5f37f6bd6 improve 'service' integration tests (#43655)
* service tests: check that daemon is really running

(spoiler: it isn't)

* service tests: add PIDFile directive in systemd unit

* service tests: check 'changed' too

* service tests: fix indentation & use changed test

* service tests: #16694 has been fixed a long time ago

* service tests: refactor

- always execute cleaning tasks
- move tests tasks in a dedicated file

* service tests: add test for #42786

* service tests: display value of ansible_service_mgr

* service tests: allow to run tests twice in a row

stop & disable ansible test service

* service tests: 'pattern' value must be a substring

'pattern' parameter is poorly named

* service tests: check ansible_test service status

* service tests: test daemon must handle SIGHUP

because 'initctl reload' sends SIGHUP, otherwise test daemon stops when
receiving the signal

* service tests: remove upstart override file too

and check that files were removed using raw module and stat command
6 years ago
Yuwei Zhou 88a738b0ba Fix nsg cannot add rule with purge_rules false (#43699) 6 years ago
Yunge Zhu 5088f7c926 add azure_rm_appserviceplan module (#40906)
* add azure_rm_appserviceplan module

* fix lint in test

* fix lint

* fix test

* fix test syntax

* resolve comments

* fix test
6 years ago
Yunge Zhu 97942cf049 add azure_rm_webapp (#40005)
* add azure_rm_webapp

* fix lint error

* resolve comments

* fix lint

* fix lint

* fix lint

* fix lint

* fix test failure

* fix test

* fix test

* fix test

* refine ux

* resolve comments

* fix lint and test

* fix lint

* code cleanup

* combine windows_frameworks/linux_framework to one

* fix lint in doc

* fix l int

* fix lint

* fix bug

* fix bug

* fix bug

* fix bug

* fix syntax error

* fix lint error

* fix bug of wrong indent

* fix test issue

* update java framework parameter

* fix lint error

* resolve comments

* fix lint

* resolve comments

* fix bug

* update test

* fix lint

* fix test
6 years ago
Dag Wieers d8ba8c03f3
ACI: Make querying links and nodes possible (#43441)
This functionality was not considered when the module was written, but
there's no reason why it shouldn't be supported.

We had to rework the query string construction and object filtering.
This new functionality allows to filter on arbitrary keys and supports
None values.

This PR fixes various issues with the existing framework, including
querying specific objects using construct_url_4 (i.e.
aci_epg_to_contract and aci_static_binding_to_epg)
6 years ago
Abhijeet Kasurde 3dcbf3b003
VMware: new module : vmware_guest_boot_facts (#43240)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
Felix Fontein 7b7709ae75 ACME: support for TLS-ALPN-01 (#42158)
* Added support for TLS-ALPN-01 verification.

* Unrelated commit to re-trigger tests.

* Added test for TLS-ALPN-01.

* Try to remove to_bytes in the hope that binary data survives in Python 2.

* Using Base64 encoding for TLS-ALPN-01 value.
6 years ago
Dag Wieers 9a8bae5b67
ACI: Add ability to enable debug for tests (#43744) 6 years ago
Nathaniel Case ab39481c31
cli_command module (#42916)
* Create cli_command module to do direct cliconf calls

* Update edgeos cliconf signature to match.

* cli_command is cli-only

* Add tests
6 years ago
Jordan Borean 2aaa1694ab
Increase win_async_wrapper fire and forget time check for more stabilisation 6 years ago
Jordan Borean 22b921d47f
win-async: fix race condition in async run (#43691) 6 years ago
Jordan Borean 8f8e3db067
win_chocolatey: fix regression around using all as a package name (#43483) 6 years ago
Pierre-Louis Bonicoli ff68b197e2 filesystem: add f2fs integration tests 6 years ago
saichint e393d5d2b4 add local directory option to nxos_file_copy (#43277)
* add local directory option to file_copy pull

*  shippable fix
6 years ago
David Moreau Simard 934500fb05 Properly detect credentials for tower_project
It seemed like it was mostly the wrong variables been looked at, making
it so a git repository could not be created without a credential.
6 years ago
Brian Coca af6b9799aa fixed test using removed feature 6 years ago
Shuang Wang 68683b4c73 fix issue [ get_url does not change mode when checksum matches ] (#43342)
* fix  #29614

* add change log for #43342

* Cleanup tests and add tests for this scenario


Co-authored-by: ptux
6 years ago
Felix Fontein e0e6fe5cf7 Forgot to include validations. 6 years ago
Sumit Jaiswal 01fb7ea150
Allow DNS bypass for add/remove of host records with nios_host_record (#42934)
* fixes issue 42420

* fixes issue 42420

* fix shippable docs error

* shippable fix and test case add

* shippable fix and test case add

* shippable fix and test case add

* shippable fix

* removing extra assert

* shippable fix
6 years ago
Sumit Jaiswal e96f90b440
Nios integration and unit tests for all remaining nios new modules (#43399)
* new nios module support

* new nios module support

* new nios module support

* new nios module support

* new nios module support

* new nios module support

* new nios module support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* test/integration/targets/nios_naptr_record/tasks/nios_naptr_record_idempotence.yml

new nios module integration test support

* fix pep8 error

* fix pep8 error

* adding newline at end

* adding newline at end

* adding newline at end

* adding newline at end

* adding newline at end

* adding newline at end

* adding newline at end

* adding newline at end

* adding newline at end

* adding newline at end

* adding newline at end

* adding newline at end

* adding newline at end

* adding newline at end
6 years ago
Yuwei Zhou 7314aa7298 Fixes #30393: Virtual machine can refer existing NIC from other resource group (#42562) 6 years ago
Gustavo Muniz do Carmo 5149ab1e00 New module request: azure_rm_virtualmachine_facts #38081 (#38279)
* New module request: azure_rm_virtualmachine_facts #38081

* New module request: azure_rm_virtualmachine_facts #38081 #38279 pep8 fixes

* New module request: azure_rm_virtualmachine_facts #38081 #38279 validate-modules fixes

* New module request: azure_rm_virtualmachine_facts #38081 #38279 serialize_vm

* New module request: azure_rm_virtualmachine_facts #38081 #38279 get_item

* New module request: azure_rm_virtualmachine_facts #38081 #38279 avoid get vm twice

* New module request: azure_rm_virtualmachine_facts #38081 #38279 some jborean93 requests

* New module request: azure_rm_virtualmachine_facts #38081 #38279 camel_dict_to_snake_dict

* New module request: azure_rm_virtualmachine_facts #38081 #38279 integration test

* New module request: azure_rm_virtualmachine_facts #38081 #38279 virtual network required

* New module request: azure_rm_virtualmachine_facts #38081 #38279 consider additional vms present

* New module request: azure_rm_virtualmachine_facts #38081 #38279 trailing comma

* New module request: azure_rm_virtualmachine_facts #38081 #38279 remove from smoketest

* New module request: azure_rm_virtualmachine_facts #38081 #38279 filtering by tag fix

* New module request: azure_rm_virtualmachine_facts #38081 #38279 virtual network issues fix

* New module request: azure_rm_virtualmachine_facts #38081 #38279 remove trailing comma

* adding curated format for vm

* New module request: azure_rm_virtualmachine_facts #38081 #38279 rights to zim + lint fixes

* clean up

* updates to vm facts

* commented out failing thing

* fixed mistake

* New module request: azure_rm_virtualmachine_facts #38081

* New module request: azure_rm_virtualmachine_facts #38081 #38279 pep8 fixes

* New module request: azure_rm_virtualmachine_facts #38081 #38279 validate-modules fixes

* fixed test

* fixed test problem

* New module request: azure_rm_virtualmachine_facts #38081 #38279 serialize_vm

* New module request: azure_rm_virtualmachine_facts #38081 #38279 get_item

* New module request: azure_rm_virtualmachine_facts #38081 #38279 avoid get vm twice

* New module request: azure_rm_virtualmachine_facts #38081 #38279 some jborean93 requests

* New module request: azure_rm_virtualmachine_facts #38081 #38279 camel_dict_to_snake_dict

* New module request: azure_rm_virtualmachine_facts #38081 #38279 integration test

* New module request: azure_rm_virtualmachine_facts #38081 #38279 virtual network required

* New module request: azure_rm_virtualmachine_facts #38081 #38279 consider additional vms present

* New module request: azure_rm_virtualmachine_facts #38081 #38279 trailing comma

* New module request: azure_rm_virtualmachine_facts #38081 #38279 remove from smoketest

* New module request: azure_rm_virtualmachine_facts #38081 #38279 filtering by tag fix

* New module request: azure_rm_virtualmachine_facts #38081 #38279 virtual network issues fix

* New module request: azure_rm_virtualmachine_facts #38081 #38279 remove trailing comma

* adding curated format for vm

* New module request: azure_rm_virtualmachine_facts #38081 #38279 rights to zim + lint fixes

* clean up

* updates to vm facts

* commented out failing thing

* fixed mistake

* fixed test

* fixed test problem

* ldap_entry 'Tuple_to_LDAPMod(): expected a byte string in the list' issue

* Revert "ldap_entry 'Tuple_to_LDAPMod(): expected a byte string in the list' issue"

This reverts commit efe316c52e5a70fc1aa9f58eff3a9d5b2599763f.

* changed return value

* fixed test

* fixed test mistake

* one space too much

* removed change made by mistake

* virtual machine description

* remove example

* fixed yaml
6 years ago
Jiri Tyr c93f24b45b Fix for creation and removal of swap record in fstab (fixes #42706, #31437 and #30090) (#42837) 6 years ago
Joren Vrancken b954917761 Surround top-level function and class definitions with two blank lines. 6 years ago
Matt Martz a7f45c0660 Add basedir to ansible_search_path before running loops. Fixes #43302 (#43431) 6 years ago
Zim Kalinowski c8fcbdef71
fix for special case of last element of url (#43354)
* fix for special case of last element of url

* improved version

* fixed mistake

* adding appropriate test

* fix problem

* just fixed task name
6 years ago
Ganesh Nalawade ea6ef3fae8
Enable setting options for cliconf and other implementation plugins (if set to configurable) (#43368)
* Enable setting setting cliconf plugin options

Fixes #43367

* Add support to set configuration options for implementation plugins (eg: cliconf)
  from `ansible-connection`

* Fix CI failure
6 years ago
Jordan Borean 9259f31fee Add Ansible.ModuleUtils.PrivilegeUtil and converted code to use it (#43179)
* Add Ansible.ModuleUtils.PrivilegeUtil and converted code to use it

* Changed namespace and class to be a better standard and fixed some typos

* Changes from review

* changes to avoid out of bound mem of server 2008

* changes to detect failure when setting a privileged not allowed
6 years ago
Matt Martz 77d2008150
Don't perform string to bool conversion in set_fact when jinja2 native types is enabled (#43425)
* Don't perform string to bool conversion in set_fact when jinja2 native types is enabled. Fixes #42599

* Add tests for boolean conversions in set_fact
6 years ago
Felix Fontein d4c16f51be New acme_* integration test using ACME test docker container (#41626)
* Using ACME test container for acme_account integration test.

* Removing dependency on setup_openssl. Waiting for controller and Pebble.

* More tinkering.

* Reducing number of tries.

* One more try.

* Another try.

* Added acme_certificate tests.

* Removed double key.

* Added tests for acme_certificate_revoke.

* Making task names more meaningful (during certificate generation).

* Using newer test container which integrates letsencrypt/pebble#137. Adding test for revoking certificate by its private key.

* Using new version of Pebble which limits the random auth delay.

* Simplifying certificates for revocation tests.

* Reworking acme_certificate tests (there are now more, but they are faster).

* Test whether account_key_content works.

* Preparing TLS-ALPN-01 support.

* Using official Ansible image of testing container on quay.io.

* Bumping version.

* Bumping version of test container to 1.1.0.

* Adjusting to new CI group names.

* Pass ACME simulator IP as playbook variable.

* Let test plugin wait for controller and CA endpoints to become active.

* Refactor common setup parts of tests to setup_acme.

* _ -> dummy

* Moving common obtain-cert.yml to setup_acme.
6 years ago
Dag Wieers 12e7e9650e
Make use of Jinja tests 'finished' (#43233)
And also used 'changed' and 'failed' tests while we are at it.
6 years ago
Orr 1e4831e744 VMware: check if folder already exists before creation (#41588)
* check if folder already exists before creation
* added integration test
6 years ago
Abhijeet Kasurde cc3dadf16e
VMware: new module : vmware_about_facts (#43146)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
flowerysong a08668cf00 Port ec2_tag to boto3 (#39712)
* Add volume manipulation to EC2 integration test policy

* Port ec2_tag to boto3
6 years ago
tstoner 2c3d418e53 Nxapi ssl (#42905)
* NXAPI ssl ciphers & protocols default values

* TLSv1, TLSv1.1, TLSv1.2 and weak cipher support

* NXOS NXAPI weak/strong cipher & TLSv 1.2, 1.1 & 1.0 support

* Version checking for strong/weak ciphers & TLS 1.2, 1.1 & 1.0 support

* Cleaned up erroneously committed changes.

* Specific NXOS platform checking for nxapi ssl ciphers & protocols

* Fixed ansibot reported errors.

* Resolved ansibot reported error.

* Added network_os_version to mocked up N7K unit test device_info

* Calling get_capabilities() once in main and passing results into methods.

* Removed raising exceptions when platform capabilities return None
per reviewers request. Skipping nxapi ssl options when capabilities
are None and generating a warning when these options are skipped

* Cleaned up explicit checks for None/not None
6 years ago
Jose Angel 711dd9f834 VMware Module - vmware_guest_move (#42149) 6 years ago
Abhijeet Kasurde 9a561b53fa
VMware: Dynamic Inventory plugin (#37456)
* Disable warnings on validate_certs=False
* Required requests version
* Add testcase for inventory plugin
* Include review comments from mattclay
* remove pyvmomi installation
* remove config file at exit
* Add cache in vmware_inventory inventory plugin
* shertel review comments
* Rename vmware_inventory to vmware_vm_inventory
* bcoca's review comments
* Export username and password for failing testcase

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
Abhijeet Kasurde 20092786cf
VMware: new module : vmware_guest_custom_attributes (#38114)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
Abhijeet Kasurde 08c9cb33b7
VMware: new module: vmware_guest_attribute_defs (#38144)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
Denis GERMAIN 3f9e457751 feat: Add a enable_accelerated_networking flag in module + tests; fixes #41218 (#42109) 6 years ago
Abhijeet Kasurde 56f5390151
VMware: additional VSAN facts about Hostsystem (#40456)
VSAN related facts (cluster_uuid) will be used in vmware_vsan_cluster
while adding new host in VSAN cluster.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
Abhijeet Kasurde 604fcb55ae
VMware: add support for boot option firmware (#42730)
This fix adds support for the boot option 'firmware'

Fixes: #42541

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
Nilashish Chakraborty 18235af363
Fix baud rate and nxos_logging default case idempotency bug (#43295)
* Fix baud rate and idempotency bug

* Fix Shippable errors

* Combine commands calls

* Fix Shippable errors II
6 years ago
Julien Champseix 19dc267e4c Allow specifying the output encoding in the template module (#42171)
Allow specifying the source and destination files' encodings in the template module

* Added output_encoding to the template module, default to utf-8
* Added documentation for the new variables
* Leveraged the encoding argument on to_text() and to_bytes() to keep the implementation as simple as possible
* Added integration tests with files in utf-8 and windows-1252 encodings, testing all combinations
* fix bad smell test by excluding windows-1252 files from the utf8 checks
* fix bad smell test by excluding valid files from the smart quote test
6 years ago
saichint fa5f396a4b nxos_file_copy enhancement (#42424)
* add file_pull option

* typo correction

* fix shippable error

* review comments

* fix for review comments by mwiebe

* possible shippable fix

* remove file_copy from ignore

* more review comments addressed

* review comments

* add localhost for remote scp server in tests

* timeout fix
6 years ago
mjmayer a488b3a8ed elb_application_lb purge rules option (#43113)
* Add parameter to keep elb rules

Does not purge elb rules. This is usefull if running the elb_application_lb
 role and there is the desire to keep existing rules.

* Change variable name keep_rules to purge_rules

The descriptor purge has been used in the past.

* Changed default for purge_rules

Default is purge_rules. This is how the module has functioned previously. This change maintains
 the previous behavior.

* Add integration test for purge_rules flag

* Change wording of test task

* Fix merge conflcit

* Changed default for purge_rules

Default is purge_rules. This is how the module has functioned previously. This change maintains
 the previous behavior.

* merge conflcit

* Change wording of test task

* Add purge_rules option to test

* Change test description wording

* Expand purge_rules documentation

* Clarifies documentation for purge_rules option
6 years ago
Jordan Borean 2c9cbae3f9
Removed deprecated Windows items slated for removed in 2.7 (#43231) 6 years ago
Adam Miller 85fedf9fcf
make sure to get correct python version for rpmfluff in setup_rpm_repo (#43228)
* make sure to get correct python version for rpmfluff in setup_rpm_repo

Signed-off-by: Adam Miller <admiller@redhat.com>
6 years ago
Dag Wieers 939de473c6
Add a 'finished' test for async jobs (#38325)
This provides a more convenient way for testing (async) jobs.

When used with a non-async job it will report a warning so the user is
aware that he may be doing something incorrect.

Since the 'finished' result value is an integer (!), the test is turning
this in a proper boolean.
6 years ago
Brian Coca cdc762dd9e
don't assume all delegation subkeys exist (#43032)
* don't assume all delegation subkeys exist

fixes #43026

* add tests
6 years ago
Deepak Agrawal bf544c2200
Add support for commit label in iosxr_config (#42931)
* Add support for commit label in iosxr_config

* sanity pep8 etc fixes
6 years ago
Matt Clay 4e489d1be8
Update Shippable integration test groups. (#43118)
* Update Shippable integration test groups.
* Update integration test group aliases.
* Rebalance AWS and Azure tests with extra group.
* Rebalance Windows tests with another group.
6 years ago
Jordan Borean 04431216e7
win_user: use different method to validate credentials that does not rely on SMB/RPC (#43059)
* win_user: use different method to validate credentials that does not rely on SMB/RPC

* Use Add-Type as SetLastError on .net reflection not working on 2012 R2
6 years ago
Jordan Borean 48ad90ac8e
powershell: support recursive requires statements (#43143) 6 years ago
Jordan Borean 93c05074ee
win_chocolatey: refactor module to fix bugs and add new features (#43013)
* win_chocolatey: refactor module to fix bugs and add new features

* Fix some typos and only emit install warning not in check mode

* Fixes when testing out installing chocolatey from a server

* Added changelog fragment
6 years ago
Matt Clay 547f11ad8f Fix win_reboot test and mark win_uri unstable. 6 years ago
Adam Miller 562ff66a98 Fix pkg_mgr_name fact finding for Fedora (#40922)
* Properly handle default package manager vs apt

For distros where apt might be installed but is not the default
package manager for the distro, properly identify the default distro
package manager during fact finding and re-use fact finding from
DistributionFactCollector and instead of reimplementing small
portions of it in PkgMgrFactCollector

Add unit test to always check the apt + Fedora combination to test
the new code.

Fixes #34014

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

* remove q debugging output I accidentally left behind

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

* add os_family to the conditional so we're only hitting that code path when needed

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

* setup for a _check* pattern for general os_family group pkg_mgr checking

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

* use Mock.patch decorator for os.path.exists in TestPkgMgrFactsAptFedora

Signed-off-by: Adam Miller <admiller@redhat.com>
6 years ago
Yunge Zhu 40fbee6369 Fix azure_rm_keyvaultkey/azure_rm_keyvaultsecret bugs (#41683)
* fix keyvault tests

* missing keyvault requirement

* fix keyvault auth bug

* apply fix in secret

* fix lint

* enable keyvault key and secret tests

* add azure service principal object_id lookup plugin

* fix lint

* add dependency in integration test

* fix bug

* put azure sp lookup plugin into test

* fix lint

* move lookup plugin

* repath lookup plugin

* repath lookup plugin

* repath files

* put az sp lookup plugin to lookup_plugins folder
6 years ago
Jordan Borean 64f5f9c2f9
win_acl: fix recent bug and add basic tests (#43054) 6 years ago
Jordan Borean 35f6bbf18b
win_wait_for: add a bit more stability to the tests (#43114) 6 years ago
Abhijeet Kasurde cadbd6ea9c
VMWare: update documentation for linked_clone (#42881)
linked_clone requires snapshot_src parameter. This fix makes them required_together
and update documentation. Also, testcase is added.

Fixes: #42349

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
Ganesh Nalawade 97d4e53131
Support setting persistent command timeout per task basis (#42847)
* Support setting persistent command timeout per task basis

Fixes #42200

*  Add variable `ansible_command_timeout` to `persistent_command_timeout`
   option for `network_cli` and `netconf` connection plugin so that the
   command_timeout can be set per task basis while using `connection=network_cli`
   or `connection=netconf`
   eg:
   ```
   - name: run copy command
     ios_command:
       commands:
       - show version
     vars:
      ansible_command_timeout: 40
   ```

* Modify `ansible-connection` to read command_timeout value from
  connection plugin options.

* Add `ansible_command_timeout` to `persistent_command_timeout`
  option in `persistent` to support `connection=local` so that
  it is backward compatibilty

* To support `connection=local` pass the timeout value as variables
  from persistent connection to `ansible-connection` instead of sending
  it in playcontext

* Fix CI failure

* Fix review comment
6 years ago
Pilou 06f5e49dfb inventory plugins: add test about config API usage (#41888)
* Check get_option method works with inventory plugins

This use case is already tested by some cloud inventoty plugin but
these tests are slow and aren't always executed, hence this new quick
test.

* AnsiblePlugin: Fix typo in docstring
6 years ago
Matej Vadnjal 7c318d4e30 ios_user module - implement sshkey option (#38782)
* ios_user module - add sshkey support

* ios_user - Add version_added to sshkey option

* ios_user - pep8 indentation fixes in unit tests

* ios_user - use b64decode method that works on python 2 and 3
6 years ago
Sam Doran 0ca61e9d87
Only report change when home directory is different on FreeBSD (#42865)
* Only report change when home directory is different

Add tests with home: parameter

Have to skip macOS for now since there is a bug when specifying the home directory path for an existing user that results in a module failure. That needs to be fixed in a separate PR.
6 years ago
Will Thames 786613f426 Handle FieldLevelEncryptionId in cloudfront_distribution (#41770)
Ensure that FieldLevelEncryptionId is properly handled - passing it if
set, and keeping it if returned by GetDistribution

Update cloudfront_distribution tests to remove references to
test_identifier so test suite actually works

Fixes #40724
6 years ago
John McDonough f89d3721b4 UCS NTP Server module (#42375)
* UCS NTP Server module initial commit

* change name to ntp_server, keep name as alias for ntp_server
6 years ago
David Soper c527af58f1 ucs_storage_profile module and integration tests (#42205)
* ucs_storage_profile module and integration tests

* Remove space in doc link to fix docs-build issue.

* Added suboption documentation and argument spec supporting list suboptions.

* Various small edits
6 years ago
Adam Harwell a9b1af8bdd Yum: Add support for --downloadonly (#41506) 6 years ago
Frank Vissing 66adabfd42 disable_excludes (#42510)
* implementing disable_excludes

* add check for yum version

* limit choices

* add testcases for disable_exclude

* fix formating

* add documentation

* syntax fix for test case

* fix indentation

* need to ignore errors when we want to do a test that fails

* test disable_excludes with zip and not sos

* add tests for yum < 3.4 not supported

* fix formating

* centos 6.1 does not support map

* drop unsupported selectattr

* cleanup testcases

* fix test cases beloging to wrong test scenarion (propper when)

* evaluate expression

* minor test fixes

* check output of msg
6 years ago
Jordan Borean 8447f25e10
win_chocolatey_config: added module to manage Chocolatey config (#42915) 6 years ago
Jordan Borean 7ae5912d91
win_chocolatey_feature: new module (#42848)
* win_chocolatey_feature: new module

* Fixed up copyright header in PowerShell file
6 years ago
Jordan Borean 933d36b25f
win_chocolatey_source: add new module to manage Chocolatey sources (#42790)
* win_chocolatey_source: add new module to manage Chocolatey sources

* Added examples and fix diff run

* Minor fixes from review

* When editing a source, recreate with the explicit options instead of using the existing source

* Fixed up copyright header in PowerShell file
6 years ago
Jiri Tyr 92c58e9a66 Adding namespace option into the xattr module (#42755)
* Adding namespace option into the xattr module

* Include namespace into the tests

* Make it backward compatible, remove re and operator module
6 years ago
Dag Wieers 2ad234f98e
aci_ap: Ensure AP is removed before tests start (#42744) 6 years ago
Matt Martz 27b4d7ed31
Add feature to expose vars/defaults with include/import_role (#41330)
* First pass at making 'private' work on include_role, imports are always public

* Prevent dupe task execution and overwriting handlers

* New functionality will use public instead of deprecated private

* Add tests for public exposure

* Validate vars before import/include to ensure they don't expose too early

* Add porting guide docs about public argument and change to import_role

* Add additional docs about public and vars exposure to module docs

* Insert role handlers at parse time, exposing them globally
6 years ago
jamessemai dc32842573 win_security_policy: Allow setting a value to empty (#42051)
* win_security_policy: allow removing values (resolves #40869)

* Removing warning

* Adding test for remove policy setting

* Fixing string comparison

* Make idempotent

* Adding idempotency and diff test

* added changelog fragment
6 years ago
Kevin Breit 2038ff5569 meraki_mx_l3_firewall - Fix idempotency for default rule logging (#42649)
* Fix idempotency and default syslog bugs

* Fix idempotency check for syslog_default_rule

* Syntax errors
6 years ago