Commit graph

5547 commits

Author SHA1 Message Date
Matt Martz
54e4c53f00
Ensure removed_in is StrictVersion before comparing (#43835)
* Ensure removed_in is StrictVersion before comparing

* Catch ValueError with StrictVersion on incompatible versions
2018-08-08 14:29:14 -05:00
Matt Clay
bd0428983c Correct task args in azure_rm_managed_disk test. 2018-08-08 09:37:20 -07:00
Lance Richardson
bd4d68c785 network/exos: add exos_facts module (#43210)
Add exos_facts module. Known limitations at this time include:
   - Interface MTU is not reported.
   - Only primary interface IP is reported.

Add basic unit tests for the exos_facts module.

An EXOS CLI prompt can be prefixed with '! ' (shutting down), '* '
(running configuration does not match saved configuration), and
can include various status tokens within parentheses after these
prefixes. Update prompt regex to accept valid CLI prompts.
2018-08-08 16:02:18 +02:00
Lindsay Hill
8429f777da New networking module: voss_command (#43741)
* new voss_command module

* Removed incorrect version_added line
2018-08-08 15:56:50 +02:00
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
2018-08-07 21:48:03 -07:00
Yuwei Zhou
88a738b0ba Fix nsg cannot add rule with purge_rules false (#43699) 2018-08-08 11:41:46 +08:00
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
2018-08-07 15:54:31 -07:00
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
2018-08-07 15:53:15 -07:00
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)
2018-08-07 23:54:54 +02:00
Yanis Guenane
68e6587748 Vultr: Ensure facts works when no resource exists (#43603)
Vultr API is being inconsisten in what it returns. An empty list when no
resources exists, but a dict of dict when they do. The case needs to be
handled so the module do not fail. An extra test has been added.
2018-08-07 20:12:36 +02:00
Abhijeet Kasurde
3dcbf3b003
VMware: new module : vmware_guest_boot_facts (#43240)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-08-07 22:08:37 +05:30
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.
2018-08-07 08:52:22 +02:00
Dag Wieers
9a8bae5b67
ACI: Add ability to enable debug for tests (#43744) 2018-08-06 22:42:10 +02:00
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
2018-08-06 10:41:57 -04:00
Jordan Borean
2aaa1694ab
Increase win_async_wrapper fire and forget time check for more stabilisation 2018-08-06 11:30:49 +10:00
Jordan Borean
22b921d47f
win-async: fix race condition in async run (#43691) 2018-08-06 09:21:53 +10:00
Jordan Borean
8f8e3db067
win_chocolatey: fix regression around using all as a package name (#43483) 2018-08-06 07:33:55 +10:00
Toshio Kuratomi
30662bedad
Only print warning when ansible.cfg is actually skipped (#43583)
Only print warning when ansible.cfg is actually skipped

* Also add unittests for the find_ini_config_file function
* Add documentation on world writable current working directory
  config files can no longer be loaded from a world writable current
  working directory but the end user is allowed to specify that
  explicitly.  Give appropriate warnings and information on how.

Fixes #42388
2018-08-03 10:39:33 -07:00
Anil Kumar Muraleedharan
119376a685 Refactoring to persistence connection BGP, factory, reload, save, showrun modules (#43534)
* Refactoring to persistence connection BGP, factory, reload, save, showrun modules

* Refactoring methods from Util to module file

* Removing BGP Utility methods

* Adding to errors that need to be ignored
2018-08-03 08:40:24 -04:00
Pierre-Louis Bonicoli
ff68b197e2 filesystem: add f2fs integration tests 2018-08-03 11:57:22 +02:00
saichint
e393d5d2b4 add local directory option to nxos_file_copy (#43277)
* add local directory option to file_copy pull

*  shippable fix
2018-08-03 10:33:06 +05:30
Zhikang Zhang
3a3869f4c8
Clarify usage of encrypt arg (#43330)
According to the do_encrypt interface, encrypt arg should be the hash method name used for encrypting returning password. But in the doc and lookup code it's a boolean flag, correct it to string.
2018-08-02 14:03:49 -04:00
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.
2018-08-02 11:17:04 -04:00
Trishna Guha
09ae1ec308
cliconf refactor eos, nxos fix (#43596)
* cliconf refactor eos and nxos fix

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

* move nxos replace check to plugins

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

* address review comment

* fix shippable
2018-08-02 16:34:48 +05:30
Brian Coca
af6b9799aa fixed test using removed feature 2018-08-01 15:17:28 -04:00
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
2018-08-01 15:02:27 -04:00
Felix Fontein
e0e6fe5cf7 Forgot to include validations. 2018-08-01 11:49:12 -07:00
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
2018-08-01 10:33:58 +05:30
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
2018-08-01 08:54:01 +05:30
Yuwei Zhou
7314aa7298 Fixes #30393: Virtual machine can refer existing NIC from other resource group (#42562) 2018-08-01 10:52:21 +08:00
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
2018-08-01 10:23:50 +08:00
Jiri Tyr
c93f24b45b Fix for creation and removal of swap record in fstab (fixes #42706, #31437 and #30090) (#42837) 2018-07-31 17:09:38 -04:00
Felix Fontein
e7e63ec1e8 Improving syntax highlighting in HTML docs (#42472)
* Adding improved YAML lexer for HTML docs.

* Fixing (some of) the warnings.

* Fixing more warnings.

* Removing ansible- prefix from lexer names.

* Rename extensions -> _extensions.

* Removing superfluous module search path extension.
2018-07-31 15:28:16 -05:00
Matt Martz
01c0446cb5
Add AnsibleModule signature schema, and fix associated issues (#43512) 2018-07-31 15:04:22 -05:00
Joren Vrancken
b954917761 Surround top-level function and class definitions with two blank lines. 2018-07-31 12:06:56 -07:00
Joren Vrancken
9e310558ee Enable PEP8 testing of E305 2018-07-31 12:06:56 -07:00
Matt Martz
a7f45c0660 Add basedir to ansible_search_path before running loops. Fixes #43302 (#43431) 2018-07-31 11:51:32 -04:00
Alex Dukhno
dd28be3aab Update pagerduty modules to rest v2 (#42618)
* refactored from procedural to OOP

* updated ongoing maintenance windows to PagerDuty REST API v2

* update create maintenance windows to PagerDuty REST API v2

* update absent maintenance windows to PagerDuty REST API v2

* update pager alert module to PagerDuty REST API v2

* removed basic HTTP authorization
updated parameter description and examples

* fix failed sanity checks

* revised documentation according to review

* make obsolete service key parameter an alias to a new integration key parameter
2018-07-31 10:39:29 -04:00
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
2018-07-31 16:31:08 +08:00
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
2018-07-30 21:53:44 -07:00
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
2018-07-30 14:48:54 -07:00
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
2018-07-30 15:44:38 -05:00
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.
2018-07-30 11:10:17 -07:00
Dag Wieers
12e7e9650e
Make use of Jinja tests 'finished' (#43233)
And also used 'changed' and 'failed' tests while we are at it.
2018-07-30 10:41:49 +02:00
Orr
1e4831e744 VMware: check if folder already exists before creation (#41588)
* check if folder already exists before creation
* added integration test
2018-07-30 11:11:42 +05:30
Egor Zaitsev
249a6aae22 New module: routeros — manage MikroTik RouterOS (#41155)
* Implement initial RouterOS support

* Correct matchers for license prompts

* Documentation updates & mild refactor

* Remove one last Cisco function

* Sanity test fixes

* Move imports to the beginning

* Remove authorize property

* Handle ANSI codes

* Revert to_lines function

* CR fixes

* test(routeros): add unit tests

* Added another test (with ANSI colors and banner in fixture).

* Ignore CRLF line endings in system_package_print file

* fix: review by ganeshrn
2018-07-30 10:28:03 +05:30
Abhijeet Kasurde
cc3dadf16e
VMware: new module : vmware_about_facts (#43146)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-07-29 14:51:14 +05:30
flowerysong
a08668cf00 Port ec2_tag to boto3 (#39712)
* Add volume manipulation to EC2 integration test policy

* Port ec2_tag to boto3
2018-07-27 15:45:18 -04:00
Florian Braun
74af52533f Variable Timout for Katello Module + Documentation (#41834)
* Changed Foreman timeout to be setable via a parameter
Added a Parameter to set the timout to wait for the started Foreman actions
by the user instead of using the hard coded 1000 Seconds

* katello module screamed for more docu :)

* fix docu + some ci findings
made docu better and moved chices in relations to other options to the description

* added a quote to description and removed wrong combination of param product

* Removed choices from params
also removed katello from a ignore file
2018-07-27 12:31:12 -07:00
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
2018-07-27 22:10:39 +05:30