Commit graph

29915 commits

Author SHA1 Message Date
Emmanuel Riviere
848782acd4 New zabbix_service module (#58926)
* New module zabbix_service (#5)

* new module zabbix_service

* fix type

* fix githubid

* New Zabbix service module (#11)

* new zabbix service module

* fix validate module failure

* Fix algorithm doc and all_childs param name

* Update Ansible version

Co-Authored-By: sky-joker <megane@kurobuti.com>

* remove dump state
2019-12-18 15:05:58 +01:00
Dag Wieers
6abf59cac8 Use module references 2019-12-18 06:22:05 -05:00
Joseph Jacobs
b121065d28 Update aci_access_port_to_interface_policy_leaf_profile.py
##### SUMMARY
<!--- Your description here -->
The links in the file are wrong.  Updating the document name to point to the right document.

https://docs.ansible.com/ansible/latest/modules/aci_access_port_block_to_access_port_module.html

##### ISSUE TYPE
- Docs Pull Request

+label: docsite_pr
2019-12-18 06:22:05 -05:00
Sean Whitesell
dfd998bcbc Added ability to specify plan information for images that require it. (#65335)
* Modified to include plan information.

* Fixed where plan is passed to the virtual machine object.

* Added changelog file

* Update changelogs/fragments/65335-add-plan-to-azure-vmscaleset-module.yaml

Co-Authored-By: Felix Fontein <felix@fontein.de>

* Added plan suboptions with required flag. Removed code block checking plan since suboptions were added.

* Changed true to True. Added space after commas where failed tests indicated.

* Removed extra blank line. Added promotion_code to plan param list.

* Trying to fix indention issue

* Trying to fix indention

* Changed example capacity to trigger build check. Last failure was not due to code.

* Removed property for accepting terms and code block using it..

* Removed extra unneeded spaces.
2019-12-18 12:55:33 +08:00
Mark Chappell
8a423868d9 AnsibleAWSModule related cleanup: (#64931)
- fetch boto3 clients using module.client()
- remove ec2_argument_spec() use (AnsibleAWSModule adds it automatically)
- remove unused imports
- remove HAS_BOTO3 (AnsibleAWSModule handles it)
2019-12-17 19:28:26 -05:00
Simon Dodsley
42144204f3 Fix purefa_host preferred array connection logic (#65917) 2019-12-17 10:46:10 -05:00
Andrew Klychkov
9b85a51c64 Bugfix of 65761: postgresql_privs fail after it's updated to 2.9.2 (#65903)
* Bugfix of 65761: postgresql_privs fail after it's updated to 2.9.2

* add changelog
2019-12-17 13:53:51 +00:00
anas-shami
ec0885cf05 Onyx username (#63897)
* Support username command to config users and edit capabilities

* Add disconnected param to disconnect all session for such user

* Edit yaml examples, add types to docs and edit the version

* Add fullname attribute

* Add no_log to password field and mutually_execlusive relations

* Fix pep8 issue

* remove debug line
2019-12-17 14:01:03 +05:30
anas-shami
557c8ab161 support syslog remote module (#63195)
* support syslog remote module

* change enabled implementation and edit the tests, also support disable override class

* fix the level order and delete types from choices
2019-12-17 12:12:55 +05:30
Sara-Touqan
84572c3b67 Supporting ntp servers and ntp peers configuration in Ansible. (#63714)
* Supporting ntp servers and ntp peers configuration in Ansible.

* Modifing ntp servers and peers config.

* Modifying ntp peers and servers configuration.
2019-12-17 11:51:29 +05:30
Sara-Touqan
d0d8fca334 Supporting SNMP Users Configurations in Ansible (#63778) 2019-12-17 11:50:58 +05:30
Sara-Touqan
fe354ed183 Supporting general ntp configurations in Ansible (#63724)
* Supporting general ntp configurations in Ansible

* Modifying ntp module
2019-12-17 11:50:32 +05:30
Sara-Touqan
13d0ebd603 Supporting general snmp configurations in Ansible (#63723)
* Supporting general snmp configurations in Ansible

* Modifying SNMP General configurations.

* Fix pycodestyle issues

Signed-off-by: Sara Touqan <sarato@mellanox.com>

* Fix documentation errors

Signed-off-by: Sara Touqan <sarato@mellanox.com>
2019-12-17 11:49:56 +05:30
anas-shami
33338decf7 Feature/onyx syslog files (#62746)
* support syslog files

* nested doc fix

* required togother

* fix docs type dict

* add file-debug feature same as files logging

* remove duplicated validation and change dict key access method

* add format of upload url and change the way of getting data from dict
2019-12-17 11:24:33 +05:30
Micah Hunsberger
a54e77193b New Windows Module: win_certificate_info (#64035)
* win_cert_stat initial commit with tests

* documentation fix.
first attempt windows server 2008 compatibility

* add formatted dates
removed debug tests

* make choices generic list

* return a list of certificates
use .net x509 store instead of PS cert provider

* fixed tests file

* fix timestamps returning null

* rename to win_certificate_info

* rename tests win_certificate_info

* return certificates as a sorted array
open the store with readonly privileges

* extensions always returned as an array
2019-12-17 12:43:03 +10:00
Jordan Borean
ae6fc265c9
Add-Type - Added a way to reference assemblies by type name (#65866)
* Add-Type - Added a way to reference assemblies by type name

* Also add architecture symbols during compile time

* Fix stray output values
2019-12-17 09:06:54 +10:00
Paul Belanger
83ad1231b8
Remove unused variable in resetconf_config.py (#65892)
Our flake8 jobs for ansible.netcommon exposed this issue.

Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2019-12-16 17:25:08 -05:00
Paul Belanger
0310163bb9
Remove unused json import for iosxr terminal (#65879)
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2019-12-16 13:25:01 -05:00
Sam Doran
6f76a48f59
Make sorting in collection_loader match plugin loader (#65776)
* Simply sorting of Windows files below other plugin types
    Using the sort method with a custom key function uses less memory than creating multiple lists then joining them.

    This seemed to be an acceptable use of a lamdba, even though I geneally try to avoid them.

* Fix sorting of plugins inside of collections
    Explicitly sort Windows files below others, mimicking what we do in plugin/loader.py

* Add documentation about ansible.builtin and ansible.legacy
    Also document to the two different methods used for searching based on the candidate type.

* Add changelog
* Add integration test
* Update comment with expected sort order
2019-12-16 11:28:24 -05:00
Ganesh Nalawade
74e9b1e219
Fix network action plugin load in collection (#65849)
* Fix network action plugin load in collection

Fixes https://github.com/ansible/ansible/issues/65071

*  Load network action plugin that matches the module
   prefix name from list of collections.

* Update changelog

* Fix unit test
2019-12-16 19:15:41 +05:30
Paul Belanger
093d1500b9
Clean up flake8 for ansible.netcommon collection (#65842)
We noticed the following flake8 errors when we ran the migration script
for ansible.netcommon.

Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2019-12-16 08:24:38 -05:00
Suhas Bharadwaj
0a04a5efc2 adding the modules to /nxos/storage/ folder (#64269)
* adding the modules to /nxos/storage/ folder

* fix pep8 stuff

* fixed provider specific information from doc

* Fix integration tests

* Added tested against note

* Review comments

* added assertions for the commands sent in the integration tests
2019-12-16 14:44:33 +05:30
sky-joker
7b2cfdacd0 Zabbix: Handle KeyError in zabbix_host module (#65392)
Fixes: #65304
2019-12-16 13:32:11 +05:30
Ganesh Nalawade
06d997b2b2 Fix nxos_file_copy argument error handling. (#65861)
*  Use `option_type` instead of `type` for error
   handling in task options
2019-12-16 13:05:18 +05:30
Adrián López
dac3bf5b71 zabbix_host: interface.port parameter is a string (#64986)
interface.port should be a string to be able to use macros in that
value.
This fixes the case when interface.port is a macro (eg.: "{$MACRO}" and
force=false.

Because, until now, setting the interface.port to an integer was the correct way to work with force=false, a type validation has been added
to that parameter.
Previously, if a string was used for interface.port, it was converted
to an integer, the comparison didn't work (if interface not in interfaces)
and the module tried to register the same interface twice, returning an
error.

Zabbix API manual specifies that only 'main, 'type', 'useip' and 'bulk'
are integers.
https://www.zabbix.com/documentation/current/manual/api/reference/hostinterface/object

Tests are changed to use always str in the interface.port.

Two new tests are added.
The first one is to show that now registering a host with force=false and
a macro in interface.port works.
The other one tests that interfaces defined using string for port are
compared correctly when force=false is used. Previously it was
a comparison between int and str, interfaces were seen as different
and an error was thrown because we were trying to create twice a main
interface.

* Try to kindly convert interface port to the string

As suggested, the previous behaviour could break current configurations. This solution accepts integers and strings.

Co-Authored-By: Dusan Matejka <D3DeFi@users.noreply.github.com>
2019-12-16 10:55:05 +05:30
Pierre GINDRAUD
94be732351 Handle push_events_branch_filter in gitlab hooks (#60039)
* Handle push_events_branch_filter in gitlab hooks

* Update doc of push_events_branch_filter option in gitlab hooks

* Ensure default empty value for push_events_branch_filter

* scm/gitlab_hook : Update version_added to 2.10
2019-12-15 17:08:10 -05:00
Ola Nyström
8165ce6144 add prefix-list to ios_bgp af-mode (#62705)
* adding prefix-list to ios_bgp

* adding prefix-list to ios_bgp

* Fix copy-paste bug in test

* Adding neigbor 10.10.20.20 to global neighbor pool

* Added prefix_list_in and _out to documentation

* Rewrite bgp prefix_list test

* Bugfix in yaml data

* More test, assert neighbor 10.10.20.20
2019-12-15 12:35:51 +05:30
Ganesh Nalawade
88008badb1
Fix nxos_file_copy option value path validation (#65423)
* Fix nxos_file_copy option value path validation

*  Modify `local_file`, `local_file_directory` and
   `remote_file` option type from `str` to `path`
   so that the option value is validated in Ansible
   for a legitimate path value

* Fix review comments
2019-12-15 10:41:33 +05:30
Ricardo Leonardo
d7414d55e1 fixes bug: visible_name was not updated when not set in existing host… (#64095)
* fixes bug: visible_name was not updated when not set in existing host in zabbix

* Update changelogs/fragments/fix_zabbix_host_visible_name.yml

Co-Authored-By: Dusan Matejka <D3DeFi@users.noreply.github.com>

* Update lib/ansible/modules/monitoring/zabbix/zabbix_host.py

Co-Authored-By: Dusan Matejka <D3DeFi@users.noreply.github.com>
2019-12-14 22:13:49 -05:00
Ganesh Nalawade
ff5253fa0e Fix network_cli become check to be compatible with collections (#65829)
*  The become method name check is not required in network_cli
   as the become command is specific to platform and is implemented
   in the platform specific terminal plugins
2019-12-14 16:50:51 -05:00
gp
98f19c970f VMware: Fix cluster argument of module vmware_content_deploy_template (#65715) 2019-12-14 20:43:35 +05:30
Andrew Klychkov
885cecfc94 postgresql modules: use query parameters with cursor objects (#65791) 2019-12-14 13:43:59 +05:30
Simon Dodsley
eb2f2ad282 Fix purefa_volume when used in check_mmode (#65825) 2019-12-14 11:24:04 +05:30
Abhijeet Kasurde
8d542edeae
VMware: Misc fixes in HTTPAPI connection plugin (#65764)
* Error handling
* Support session URL

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2019-12-14 09:47:21 +05:30
Andrew Klychkov
24b1409667 postgresql_sequence: use query parameters with cursor object (#65787) 2019-12-14 09:46:27 +05:30
Tad Merchant
ab54736e12 Add tags to aws ecs task (#53717)
* Add tags to ecs_task

remove older reference to credentials

* uncomment shell commands to enable/disable account settings

* Fix documentation and pep8 issues

* fix review items for ecs_task tags

use missing_required_lib for tags
change fail_json message to suggested message
switch from task_tags to tags for consisitency

* Add import for missing_required_lib function

* Tidy put-account-setting tasks and add permission

Using `environment` and `command` rather than `shell` avoids the
need for `no_log` and means that people can fix the problem

* update version added for ecs_task tags

* fix tests after removal of ansible_facts from ecs_service_info, add delay when service is still draining

* Add documentation for sanity tests
2019-12-13 16:54:44 -07:00
Richlv
1535d9fd90 Allow template import to create groups (#65503) 2019-12-13 09:25:07 -05:00
Andrew Klychkov
a68269660e mysql_user: support for MySQL plugin authentication (#65789)
* mysql_user: support for MySQL plugin authentication

* add changelog fragment
2019-12-13 09:23:06 -05:00
Ganesh Nalawade
2ef47148cd
Fix action plugin issue with network connection type in common collection (#65078)
* Fix action plugin isse with network connection type in common collection

*  For network connection in common collection the value of
   ansible_connection is the FQCN of the connection type
   For example ansible_connection=network.common.network_cli

*  Add fix in supported network action plugins to extract
   the connection name from FQCN

* Fix CI issue

* Fix review comments and update community network action plugins
2019-12-13 19:22:56 +05:30
Chris Van Heuveln
d72025be75 nxos_interfaces: RMB state fixes (#63960)
* nxos_interfaces: RMB state fixes

* shippable fixes

* Add add'l comments per review

* fix long line

* Fix mode/enabled system defaults handling

* fix N3L test skips

* lint

* test updates for titanium images

* doc fix
2019-12-13 18:06:21 +05:30
jalbersdorfer
f1fc5dba92 add asterisk '*' to the list of non-working operations (#65728)
Asterisk '*' doesn't work either in the command module
2019-12-12 17:03:11 -06:00
Tad Merchant
493ec588ab Ec2 metric alarm boto3 and treat missing data (#62669)
* Converted ec2_metric_alarm to boto3. Added treat_missing_data option.

* Handle potentially non-existent alarm keys in ec2_metric_alarm module

* Add treat missing data to ec2_metric_alarms wth some tests

Continues the work of #23407

* Clean up ec2_metric_alarm main test playbook

* fix test suite and sanity checks

* more fixes for sanity tests

* fixes to ec2_metric_alarms requested in code review

* import ClientError from botocore, catch generic ClientError

* more fixes from review

drops extra dict in argument spec and set_facts for aws access

* Fix pep8 blank line issue

* switch to fail_json_aws, add idempotency test

* fix under indented continuation

* remove unsupported alias

* Add group to ec2_metric_alarm aliases

* Put alarm prefix before resource prefix to match aws-terminator pr 63

* Add type for treat_missing_data
2019-12-12 14:09:09 -07:00
Andrew Klychkov
0079b8eaa2 mysql_info: add return_empty_dbs parameter (#65755)
* Bugfix of 65727: mysql_info doesn't list empty DBs

* add changelog

* mysql_info: add return_empty_dbs parameter

* fix
2019-12-12 14:10:52 +01:00
Tim Gates
cbc513e748 Fix simple typo: workind -> working (#65758)
Closes #65757
2019-12-12 15:37:14 +05:30
Joshua Schmidlkofer
570c82f068 Patch: fix seports to allow integers or string (#65134)
Signed-off-by: Joshua Schmidlkofer <joshua@joshuainnovates.us>
2019-12-12 14:15:33 +05:30
Arvind Shyamsundar
4a54873023 Correct the spelling of property to last_modified (#65752)
Fixed the misspelt 'last_modified' field in azure_rm_storageblob output
2019-12-12 13:49:08 +05:30
Pavan Bidkar
356e3e30fa VMware: Handle KeyError while moving VM from suspended to poweredon
Modified module_utils/vmware.py to handle KeyError while moving VM from suspened to poweredon state.
2019-12-12 09:46:24 +05:30
Abhijeet Kasurde
41e19a4058
inventory: Fail on non-existing limit file (#59758)
Ansible now fails with error message when user provides
non-existing limit file.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2019-12-12 09:09:40 +05:30
Sebastian Wagner
a0cf42ae32 removed unnecessary ipv* address-family statements from vrf if the ip version is not used (#53866) 2019-12-12 00:29:23 +05:30
Abhijeet Kasurde
e82b28a920
cgroup_perf_recap: Check if user wants to write to files or not (#64988)
if user sets 'write_files' to False or does not set value, then
handle file write related operations.

Fixes: #64936

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2019-12-11 20:21:38 +05:30