Commit Graph

24904 Commits (9fa46e7f946bfe244d0e126bd96588b460592826)

Author SHA1 Message Date
Wojciech Wypior 8b1214596a adds apm policy fetch module (#50534) 6 years ago
Jordan Borean b967f4dcc1 dnf/yum - added install_weak_deps option (#50525)
* dnf/yum - added install_weak_deps option

* skip creating weak dep packages if rpm doesn't support it

* fix rpm check for older hosts
6 years ago
Ganesh Nalawade 555732f8bb
Fix junos terminal error regex (#50538)
*  Change junos terminal error regex to read error string
   correctly.
6 years ago
Trishna Guha 97621852db
add privileged role validation for nxos become (#50312)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
6 years ago
Ganesh Nalawade 71113ee291
Fix backup issue in network config modules and network action plugins common code refactor (#50301)
* Fix backup issue in network config modules

*  Fix `get_working_path` not found issue introduced due to
   backup config code refactor (PR #50208)

*  Further refactor config related action plugins to minimize
   duplicate code

*  Remove unwated imports in config action plugins

* Add common network class for action plugin and related code refactor

* Fix review comment
6 years ago
UNR Information Security 8f55e817d2 Correct Errors in Documentation (#50507)
* Correct Errors in Documentation

According to the module, "compose" is not required, but the docs said it was - removed the "required" tag. Additionally, the example for removing a stack did not include the required "name" option (this method is why "compose" is not required.
+label: docsite_pr

* Removed change to description

Corrected issue to my "correction" on the description.

* Removed required false

* Removed all instances of required: false.
6 years ago
Yunge Zhu 83da2de9a0
azure_rm_webapp: fix updating app settings (#49181) 6 years ago
Lunik 06f0cde97d remove forced lowercase on group_name (#50445) 6 years ago
Arne Jørgensen 15fb9d3bc0 Fix lastpass lookup error
Fixes #42062.
6 years ago
Sumit Jaiswal 189fcb37f9
Added new module to support NIOS Fixedaddress DHCP property (#49119)
Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>

* nios fixedaddr new module

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>

* updating name

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>

* added unit tests

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>
6 years ago
Abhijeet Kasurde bc6cd13874
Handle exception raised in recursive_finder API (#49590)
User module can contain Indentation errors or syntax errors.
Handle AST exceptions rather than showing traceback while importing such module.

Fixes: #21707

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
Richlv 73ffe683b2 Update documentation for mysql_db notes (#50444)
* Simplify the requirement section to avoid duplicating info already in mysql_document_fragment.
* Package installation section simplified, mentioned RHEL; a typo fix in "than".
* added dnf for Fedora
6 years ago
Toshio Kuratomi 27c7d5bb01 Move the arguments module into cli/ and context_objects into utils
* Note: Python2 is not as intelligent at detecting false import loops as
  Python3.  context_objects.py cannot be added to cli/arguments because it
  would set up an import loop between cli/__init__.py,
  cli/arguments/context_objects.py, and context.py on Python2.

ci_complete
6 years ago
Toshio Kuratomi ed8e60d804 Cleanups and fixes to cli
* Mark methods which are really functions as staticmethod
* Fix calls to other staticmethods to use the subclass rather than the
  base class so that any inheritance overriding will be honored.
* Remove unnecessary logic and dead code
* Fix a typo in a docstring of how to implement subclass init_parser()
  methods
* Call superclass's post_process_args in ansible-doc
* Fix copyright comment according to suggested practice
6 years ago
Toshio Kuratomi 7e92ff823e Split up the base_parser function
The goal of breaking apart the base_parser() function is to get rid of
a bunch of conditionals and parameters in the code and, instead, make
code look like simple composition.

When splitting, a choice had to be made as to whether this would operate
by side effect (modifying a passed in parser) or side effect-free
(returning a new parser everytime).

Making a version that's side-effect-free appears to be fighting with the
optparse API (it wants to work by creating a parser object, configuring
the object, and then parsing the arguments with it) so instead, make it
clear that our helper functions are modifying the passed in parser by
(1) not returning the parser and (2) changing the function names to be
more clear that it is operating by side-effect.

Also move all of the generic optparse code, along with the argument
context classes, into a new subdirectory.
6 years ago
Toshio Kuratomi afdbb0d9d5 Save the command line arguments into a global context
* Once cli args are parsed, they're constant.  So, save the parsed args
  into the global context for everyone else to use them from now on.
* Port cli scripts to use the CLIARGS in the context
* Refactor call to parse cli args into the run() method
* Fix unittests for changes to the internals of CLI arg parsing
* Port callback plugins to use context.CLIARGS
  * Got rid of the private self._options attribute
  * Use context.CLIARGS in the individual callback plugins instead.
  * Also output positional arguments in default and unixy plugins
  * Code has been simplified since we're now dealing with a dict rather
    than Optparse.Value
6 years ago
Toshio Kuratomi c18da65089 Add a CLIArgs Singleton class that will hold the parse cli arguments 6 years ago
Toshio Kuratomi 5844c8c7f0 Cleanups to the common.sys_info API
* Move get_all_subclasses out of sys_info as it is unrelated to system
  information.
* get_all_subclasses now returns a set() instead of a list.
* Don't port get_platform to sys_info as it is deprecated.  Code using
  the common API should just use platform.system() directly.
* Rename load_platform_subclass() to get_platform_subclass and do not
  instantiate the rturned class.
* Test the compat shims in module_utils/basic.py separately from the new
  API in module_utils/common/sys_info.py and module_utils/common/_utils.py
6 years ago
Dag Wieers f90ec17465
ACI: Implement encoded query_string (#50358)
This requires urldecode support in Ansible
6 years ago
Dag Wieers f45c41ef3e urldecode filter for Jinja2 (#28503)
* urldecode filter for Jinja2

We needed this in order to deconstruct correct URLs using Jinja2.
And we might as well upstream this.

* Add integration tests

* Fixes for Python 3

* Add urlencode for older Jinja2
6 years ago
Matt Martz 3b49bbcfde Give IncludedFile more context via ansible_search_path (#50045)
* Give IncludedFile more context via ansible_search_path to template lookups. Fixes #49969

* Update units
6 years ago
Jordan Borean 63e454a4b2 dnf - fix conf_file loading (#50515) 6 years ago
drewmullen 04a9a887d5 allow for vault enterprise namespaces (#50462)
* enable namespaces feature for hashi_vault lookup

* include version_added dict in options documentation
6 years ago
Dag Wieers d863027159 Windows: Add missing parameter types and doc fixes (#50232)
* Windows: Add missing parameter types and doc fixes

This PR includes:
- Adding missing parameter types
- Various documentation fixes

* Update lib/ansible/modules/windows/win_copy.py

Co-Authored-By: dagwieers <dag@wieers.com>

* Update lib/ansible/modules/windows/win_credential.py

Co-Authored-By: dagwieers <dag@wieers.com>

* Update lib/ansible/modules/windows/win_domain_computer.py

Co-Authored-By: dagwieers <dag@wieers.com>

* Update lib/ansible/modules/windows/win_domain_user.py

Co-Authored-By: dagwieers <dag@wieers.com>

* Update lib/ansible/modules/windows/win_environment.py

Co-Authored-By: dagwieers <dag@wieers.com>

* Update lib/ansible/modules/windows/win_psexec.py

Co-Authored-By: dagwieers <dag@wieers.com>

* Update lib/ansible/modules/windows/win_uri.py

Co-Authored-By: dagwieers <dag@wieers.com>

* Update lib/ansible/modules/windows/win_wait_for.py

Co-Authored-By: dagwieers <dag@wieers.com>

* Ensure docstrings are raw strings
6 years ago
Peter Kirby 5a8aa7ca1f Fixes #37209 - Added complex return value, instance (#49989) 6 years ago
Richlv ff4af614e1 Update zabbix_action.py (#50490)
* Add trailing dots for consistency.
* Document how the current host can be specified for "run_on_hosts".

+label: docsite_pr
6 years ago
Abhijeet Kasurde ae404d1476 gcp: documentation update (#50183)
* gcp: documentation update

* Update example about dynamic inventory
* minor typo fixes in gcp_utils
* Additional information about enabling inventory plugin in ansible.cfg

partially fixes: #44404

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
Ondra Machacek 362e603eb3 ovirt_host: Improve failed upgrade check (#50489) 6 years ago
Wojciech Sciesinski df93e08d6a Add choices of the state parameter documentation (#50481)
* Add choices of the state parameter documentation

* Consistency
6 years ago
lolcube e295315ef7 add openssh_cert module (#49605)
* add openssh_cert module

* fix some linter issues

* address review feedback

* add basis for integration tests

* change valid datetime formats

* handle principals as set not as list

* handle principals as set not as list

* handle principals as set not as list
6 years ago
Felix Fontein 5c5cd2dc4d openssl_*: prevent error when path includes no path (#50322)
* Prevent error when path includes no path.

* Add changelog.
6 years ago
Felix Fontein a5bf71ac6a openssl_csr: idempotency doesn't work correctly for keyUsage (#50361)
* Fix key usage idempotency bug.

* Extend tests.

* Add changelog.
6 years ago
Felix Fontein 6b33c588d0 docker_swarm_service: Fix typo for option type (#50483)
* Fix typo for option type in docker_swarm_service.

* Add changelog.
6 years ago
Joseph Benden d810acf7a5 Add support for Kali Linux detection. (#50331)
Signed-off-by: Joseph Benden <joe@benden.us>
6 years ago
Adam Miller ca084889c7 fix order of dnf api operations so transactions don't fail (#50038)
* fix order of dnf api operations so transactions don't fail

Previously dnf.base.fill_sack() was called before
dnf.base.update_cache() which apparently breaks dnf transaction
logic as per https://bugzilla.redhat.com/show_bug.cgi?id=1658694

Fixes #49060

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

* add changelog and test case

Signed-off-by: Adam Miller <admiller@redhat.com>
6 years ago
Wojciech Wypior 3ef71e529a added new module to manipulate signatre sets on ASM policy (#50209) 6 years ago
Wojciech Wypior 78e81b2965 fixed a bug in transform_name (#50213) 6 years ago
Eric L 69deb73803 Fix firewalld module failing on missing protocol. (#50242)
Under Python 3.7 at least, the split of the port field fails
ungracefully if there is no slash. The fix also addresses the
case of an empty protocol after the slash.
6 years ago
Remi Verchere 23706dbc20 Add support for NRDP notifications (#39297)
* Add support for NRDP notifications

* Correct pep-8 check, adding copyright

* Correct pep-8 check using autopep8

* Update nrdp to 2.6 version

* Update nrdp to 2.7 version

* Use internal ansible url and options modules

* Remove useless comments

* Add option to validate https certs

* Update nrdp to 2.8 version

* Correct nrdp pep8
6 years ago
Kortum, Kevin e2f6598e3f - Fix sanity checks
- Fixed documentation trailing whitespaces
  - Added missing/broken documentation
6 years ago
Stephan Schwarz deba5f0e54 Added Ansible UTM Module for managing reverse proxy auth profile entries. 6 years ago
Kortum, Kevin d3865a0a8a - Fix sanity checks
- Fixed documentation trailing whitespaces
  - Added missing/broken documentation
6 years ago
Johannes Brunswicker 617e20e955 Added Ansible UTM Module for managing reverse proxy frontend entries 6 years ago
Kortum, Kevin e52b6c8554 - Fix sanity checks
- Fixed documentation trailing whitespaces
  - Added missing/broken documentation
6 years ago
Johannes Brunswicker d556d27825 Added Ansible UTM Module for managing reverse proxy location entries 6 years ago
Yuwei Zhou 14129b09f7 rename force to force_delete_nonempty (#50290) 6 years ago
Felix Fontein 26e3240315 docker_secret, docker_config: allow to base64-decode data (#49688)
* Adjust docker_config and docker_secret to be more similar.

* Add data_is_b64 parameter to docker_secret and docker_config.

* Add changelog.
6 years ago
René Moser e761ea3f9d
vultr_server: fix multiple ssh keys not handled (#50337)
* vultr_server: fix multiple ssh keys not handled

* add changelog fragment
6 years ago
Simon Dodsley 507f89e693 Pure Storage facts fix (#50349)
* Add module for Pure Storage FlashBlade to manage directory services

* Fix facts not correctly passing into ansible_facts dict
6 years ago
curry9999 9fb4e24660 Documentation remove escape r (#50277)
* A colon is not described

* dddd

* Update branch
6 years ago
Simon Dodsley cda4010024 Fix bad placement of array variable (#50256) 6 years ago
Felix Fontein 04e2a94687 Improve tagging examples. (#50321) 6 years ago
Felix Fontein a1dfce3aa1 ACME: add seealso references (#50320)
* Add seealso references to ACME modules.

* Bump to latest drafts.
6 years ago
Adam Miller 33156712a9 Provide both service state and status when possible in service_facts (#49618)
* Combine systemd units/unit-files output for service_facts

Fixes #47118

Previously we were only taking the output of `systemd units` which
would leave out information about the service units that were
disabled, static, masked, etc. Now we're aggregating the results so
that anything not active/inactive/dead at least is pulled as fact
data with it's state provided.

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

* provide state and status information about services

Fixes #45730

Signed-off-by: Adam Miller <admiller@redhat.com>
6 years ago
John Hu 9be3ebc596 docker_image: add network parameter (#50313)
* docker_image: add network parameter

Add a network parameter to the docker_image module to specify the
network to use for RUN commands.

Called it network instead of network_mode as the latter seems like a
legacy of when there were just a few default options to choose from,
while now the name of an arbitrary network can be specified.

Fixes #21433

* Format description

* Update docker_image option_minimal_versions

* Ensure network_mode param optional
6 years ago
Nilashish Chakraborty d4db426737
Change net_* default behaviour on missing module (#49923)
* Fix net_base default behaviour

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>

* New fix

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
6 years ago
Ruben Tsirunyan 09ba1f38f1 Zabbix Action: Idempotency fix (#50297) 6 years ago
rajaspachipulusu17 3517373cfd Pluribus Networks igmp snooping module with Unit tests (#50146) 6 years ago
Ganesh Nalawade 104c415543
Fix for AttributeError in network_cli (#50284)
*  Value of prompt_answer is wrongly used as `self.prompt_answer`
   while logging it in message queue
6 years ago
kvaps 344b6002b1 fix: ansible_kubectl_ssl_ca_cert variable (#50217)
* fix: mistake for ansible_kubectl_ssl_ca_cert variable

* fix: K8S_AUTH_VERIFY_SSL
6 years ago
curry9999 4fe346da18 Add colon after module name (#50274)
* A colon is not described

* dddd

* Update aws_kms_facts.py
6 years ago
Abhijeet Kasurde fc6c500b5b
postgresql_user: set type of conn_limit (#50178)
conn_limit type is set to 'int'. This will allow module to compare conn_limit with record value without type casting.

Fixes: #38118

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
Jason Lingohr 4c3064a36f Update nios_aaaa_record.py (#50271)
Should be ipv6.

+label: docsite_pr
6 years ago
Simon Weald d4bd323c3a update github handle (#50235) 6 years ago
Dag Wieers 84210e6b17
Fix typo 6 years ago
Alex Stephen 303abadf52 New GCP Module: gcp_compute_interconnect_attachment_facts (#48217) 6 years ago
Alex Stephen 746e80e9e1 New GCP Module: gcp_container_cluster_facts (#48249) 6 years ago
Alex Stephen c0f44dfbaf New GCP Module: gcp_container_node_pool_facts (#48251) 6 years ago
Alex Stephen 251d049a54 New GCP Module: gcp_iam_service_account_facts (#48257) 6 years ago
Alex Stephen 3422a43555 New GCP Module: gcp_resourcemanager_project_facts (#48263) 6 years ago
Alex Stephen 02c6989f41 New GCP Module: gcp_spanner_database_facts (#48265) 6 years ago
Alex Stephen a6cfdc6e63 New GCP Module: gcp_spanner_instance_facts (#48267) 6 years ago
Alex Stephen e499718a50 New GCP Module: gcp_sql_database_facts (#48269) 6 years ago
Alex Stephen f73539284b GCP Bug Fixes (#49458)
* Bug fixes

* fixes as of 12/5/2018

* changes as of 12/06/2018
6 years ago
Alex Stephen b9c630f1b1 New GCP Module: gcp_sql_instance_facts (#48271) 6 years ago
Nathaniel Case f05979932b
Allow AnsibleVaultEncryptedUnicode to pass through exec_jsonrpc (#48306)
* Allow AnsibleVaultEncryptedUnicode to pass through exec_jsonrpc

* Add changelog
6 years ago
Alex Stephen 7f3e4910b0 New GCP Module: gcp_sql_user_facts (#48273) 6 years ago
Nathaniel Case b2423e7602
Log device interaction and push labeled logs back to controller (#50028)
* Add session tracing support for network_cli, netconf and httapi connection

*  Add `persistent_log_messages` configuration option to log device inteaction
   in log file for network_cli, netconf and httapi connection
   type
*  Log jsonrpc request and response in log file is configuration option
   is enabled

* Update docs to talk about warning shown when persistent_log_messages is on
6 years ago
Nathaniel Case c093ea5a28
Merge backup functionality across config action plugins (#50208)
* Merge backup functionality across config action plugins

* Port updated cli_config
6 years ago
Nathaniel Case 0b3aa75b7f
Add backup parameter to cli_config (#50206)
* Add backup parameter to cli_config

* Add a unit test for cli_config backup
6 years ago
Zim Kalinowski 92de28756d fixed invalid samples (#50227)
* fixed invalid samples
6 years ago
Abhijeet Kasurde fc5ea7c999
postgresql_idx: misc fixes (#50199)
* Removed unused import
* Removed 'login_password' from exit_json call
* Removed unused db, cond variable

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
Christian Kotte 064825df30 Revert changes in vmware_vcenter_statistics(#49537) 6 years ago
Diane Wang ebaeb1d8b4 VMware: add VBS configuration support for Windows 10 (#48595)
* Fix space issue
* fix whitespaces issue
6 years ago
anasbadaha d2446cbf0f Fix Issue #39598 (#49982)
* Fix Issue #39598

Signed-off-by: Anas Badaha <anasb@mellanox.com>

* Fix unit test for onyx_config

Signed-off-by: Anas Badaha <anasb@mellanox.com>

* Add comments for save running config

Signed-off-by: Anas Badaha <anasb@mellanox.com>

* Enhance onyx_config bug fix

Signed-off-by: Anas Badaha <anasb@mellanox.com>

* Fix result['changed'] = True comment

Signed-off-by: Anas Badaha <anasb@mellanox.com>
6 years ago
anasbadaha 6178a55afd Fix Issue #49612 (#50073)
* Fix Issue #49612

Signed-off-by: Anas Badaha <anasb@mellanox.com>

* Fix Pep8 failures

Signed-off-by: Anas Badaha <anasb@mellanox.com>

* Add validation for send empty group name

Signed-off-by: Anas Badaha <anasb@mellanox.com>

* Fix Error message

Signed-off-by: Anas Badaha <anasb@mellanox.com>
6 years ago
Dag Wieers 0fe7d569c9 win_firewall_rule: Remove invalid 'bypass' action (#50207)
* win_firewall_rule: Remove invalid 'bypass' action

This fixes #50143

* Add changelog fragment
6 years ago
Dag Wieers 50ed152ab9 win_updates: Correctly report changes on success (#50188)
* win_updates: Correctly report changes on success

* Add changelog fragment
6 years ago
Abhijeet Kasurde ff49bbd15d Misc documentation update (#50190)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
Jacob Floyd 069e0b8d57 Make modprobe module check for builtins as well (#37150)
Without this modprobe always reports changed when modprobe-ing a builtin module.

With this, if a kernel module is a builtin, the modprobe module will:
- succeed (without incorrectly reporting changed) if ``state`` is ``present``;
- fail if ``state`` is ``absent``

The failure will have whatever error message modprobe returns when
attempting to remove a builtin module. For example:
``modprobe: ERROR: Module nfs is builtin.``
6 years ago
Dag Wieers 14b03ac15f
MSC: Various bugfixes and features enhancements (#50200)
* MSC: Various bugfixes and features enhancements

This PR includes:
- Lookups of roles, labels and domains
- Auto-create new labels
- Improvements to comparing complex datastructures
- Force removal of sites
- Support non top-level queries
- Document internal functions
- Add parameter types to modules
- Fix documentation examples
- Improvements to idempotency wrt. returning changed
- Support site locations
- Update permission list
- Various improvements to integration tests

* Fix Ci issues
6 years ago
Felix Fontein f55481863d Prevent error if module.params['path'] has no path included. (#50106) 6 years ago
Gavin Williams 01a1ce16ce Jenkins_plugin: Handle 'latest' version when installing plugin for first time (#49723)
* Handle 'latest' version when installing module for first time

Otherwise, a fresh install of a plugin with 'version: latest' gets installed without its dependencies, rendering the plugin effectively useless.

* Add changelog
6 years ago
Julien Girardin 3e303bea4c List correctly current PV in "lvg" module: fix lvg reduce (#49731)
* Refactor integration test for lvg module to introduce grow/reduce test

* List correctly current PV in lvg module: fix lvg reduce

Previous behaviour was to only take into account PV passed in 'pvs'
argument. This lead to reduce not working as expecting:

* with state=present and list of wanted pvs, lvg found only the pvs to
  add or already present and ignored the pv to remove (obviously absent
  from the list of given PV)

* with state=absent and a pv to remove, lvg found that the remaining pvs
  list is empty (ignoring possible other PV in the vg) and decides to
  remove the vg entirely (as supposely no PV are left anymore to store
  lvm metadata)

* Add changelog fragment
6 years ago
Richlv bb9bad89bb Update ini.py (#50171)
Typo/grammar/consistency fixes.
6 years ago
John R Barker 69abf984a1 Remove incorect author (#50191) 6 years ago
Chris Archibald 39b1f1c363 Rewrite (#49570) 6 years ago
Dhanuka 44e2cbe7b7 Update `Unknown error` to specific error message (#50129)
* Update `Unknown error` to specific error message

outputs the Exception received rather than just 'Unknown error'
fixes: issue/49713

* Update `Unknown error` to specific error message

improves the error message
6 years ago
Miguel Duarte Barroso 4951e5a5b7 os_security_group_rule proper module exit (#50076)
When the security group the rule belongs to does not exist and
the state is absent, the module is not properly exited, leading
to a playbook execution failure.

Fixes issue #50057
6 years ago
Michael Rose bcae7f24cb influxdb_user: Fixed unhandled exception on invalid login credentials (#50134) 6 years ago
Sumit Jaiswal f76d7bdbef
New Module for creating, managing Infoblox NIOS nameserver groups (#49124)
* adding new nios_nsgroup module

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>

* adding new nios_nsgroup module

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>

* adding new nios_nsgroup module

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>

* fix shippable errors

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>

* added unit tests

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>
6 years ago
Nilashish Chakraborty e009eff925
Fix eos terminal plugin (#49920)
Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
6 years ago
Zim Kalinowski 418c705196
sku in the sample became invalid, so updating (#50177) 6 years ago
Zim Kalinowski 7a8fcfbaea
fixing network client version (#50182) 6 years ago
Youhua Li 53eb3ad1e8 add range_start and range_end agrs when query vm by a single id (#50056) 6 years ago
Abhijeet Kasurde 4a82ea8392 Fix type in RETURN for bitbucket_deploy_key
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
Christian Kotte 3f8d541326 VMware: Improve vmware_host_ntp module (#47273) 6 years ago
Ali bdcf310e5d New Module: Add bitbucket_deploy_key (#27467)
* added new module to manage deploy keys for BitBucket repositories
* Modified module to pass CI tests
* Updated bitbucket_deploy_key module
* updated message returned when there is an existing deploy key
* bumped version_added to 2.8
* fixed issues reported by ansible-test
6 years ago
Nathaniel Case 806b90f6f1
Log netconf connection a la paramiko (#50169) 6 years ago
Richlv 47e72063a3 Update zabbix_action.py (#50149)
Mostly typo/grammar fixes. "Zabbix Server" was changed to just "Zabbix", as it could be slightly confusing - some people might interpret this referencing the server process, although API matters. "capital-case" was changed, as it usually is one of "capital" or "upper-case".

+label: docsite_pr
6 years ago
Baptiste Mille-Mathias 8ec9565aa9 Fix typo in ds_type in examples section (#50166)
replace ds_type elasticisearch by elasticsearch
6 years ago
Alicia Cozine 6fc4bb4a6d Command module docs: args vs argv (#49907)
* add note about 'args', update examples
* Update lib/ansible/modules/commands/command.py

Co-Authored-By: acozine <879121+acozine@users.noreply.github.com>
6 years ago
mhoffmann1 ae826cddf4 VMware: Update example vmware_deploy_ovf (#49893)
* Update vmware_deploy_ovf.py
Provided more detailed example using additional, often used parameters
Co-Authored-By: mhoffmann1 <marcin.hoffmann@intel.com>

* Replace variable values in example task
Co-Authored-By: mhoffmann1 <marcin.hoffmann@intel.com>
6 years ago
Alan Rominger b784c7c4ea update openshift inventory plugin docs (#49901) 6 years ago
Brian Coca b0c28f86de Revert range change (#50155)
* Revert "Fix incorrect examples with random filter (#50137)"

This reverts commit 9a7dbd5213.

The correction is incomplete and also based on a 'fix' that was supposed to have been reverted already

* Revert "Added `+1` to the `end` in `random` filter so that it was inclusive (#27215)"

This reverts commit ea2b89c7ae.

reverted fix as agreed at the time, but missed by maintainers.
6 years ago
Anil Kumar Muraleedharan eab3b02cb3 Refactoring of cnos_interface module like what followed by other vendors (#49927)
* Refactoring of cnos_interface module like what followed by other vendors

* To remove cnos-interface from E326 validation ignore list

* Effect of default parameters impacted UT
6 years ago
Nathaniel Case 1829a72885
Allow persistent connection plugins to queue messages back to ansible-connection (#49977)
* Connections can queue messages to be returned from ansible-connection

* Provide fallback for invalid display level

* Strip display from plugins

* Route messages through helper method to try to avoid improper appends
6 years ago
Brian Coca 49993a55e5
dont think all files are valid cause libs present (#50103)
verify_file was improperly always returning true if pyvimomi and requests libs were correct
  moved library checking to parse, avoid unneded errors unless the file is actually meant for
  this plugin
6 years ago
Wojciech Wypior 1a9fcd9a10 corrected valid type values in RETURN (#50148) 6 years ago
Jon Bergli Heier 12c37802e8 rabbitmq_binding: Fix using empty routing key (#48597)
* rabbitmq_binding: Fix using empty routing key

If the routing key is an empty string we need to use the special props
value ~ in the URL. Otherwise the last part of the URL will be empty,
which will instead be equivalent to the "list all bindings" API call
which always returns 200 OK (as long as the exchange and queue exists).

* rabbitmq_binding: Move routing_key test outside format

Test the routing_key value and set the props value outside the format
call. We leave the original routing_key untouched since its original
value is later needed in create().
6 years ago
Andrea Tartaglia 65c7424a35 Added organization in the scm_credential get (#49884)
* Added organization in the scm_credential get

* Fallback looking for cred in project org

* Tests project with multi org credential

* Fixed CI issue

* Added changelog fragment
6 years ago
rajaspachipulusu17 afdd4e2343 Pluribus Networks dhcp filter module with unit tests (#49848)
* Pluribus Networks dhcp filter module with unit tests
* Added type which was missing in doc
* Removed unwanted global variable
* Fix return type
6 years ago
rajaspachipulusu17 8ca02d8359 Pluribus Networks admin service module with unit tests (#49854)
* Pluribus Networks admin service module with unit tests
* Documentation fix
* import module changes
* Removed unused imports
* Fix return type
6 years ago
soulofmischief f43217d520 Fix typo: or -> on (#50123)
"To create a disabled account or Linux systems" should be "To create a disabled account **on** Linux systems"

+label: docsite_pr
6 years ago
mbork 2e63c3432f Update git.py (#50139)
* Update git.py

Mention `accept_hostkey` in the description of `ssh_opts`

+label: docsite_pr

* Small fix to formatting
6 years ago
Ganesh Nalawade cc8e90395a
Fix mandatory statement error for junos modules (#50074)
* Fix mandatory statement error for junos modules

Fixes #40267

*  Add error regex in junos terminal plugin to error out
   in case of commit fails

*  If commit fails add logic to discard changes before existing
   else next task will result in error

* Add integration test

* Minor update
6 years ago
Jordan Borean 65ce1b727e
win_copy - fix remote dir copy when it contains an empty dir (#50126) 6 years ago
Wojciech Wypior e9d7c8f328 fixed an issue with parameter breaking idempotency (#50117)
* fixed an issue with parameter breaking idempotency

* Update bigip_pool_member.py
6 years ago
Wojciech Wypior 0a55805ede changed oData filters (#50112)
* changed oData filters

* Update bigip_asm_policy_fetch.py

* Update bigip_asm_policy_import.py
6 years ago
Wojciech Wypior af19bc95e8 added asm endpoint facts (#50114)
* added asm endpoint facts

* Update bigip_device_facts.py
6 years ago
Wojciech Wypior 59f4871615 added bigip_asm_policy_manage (#50115)
* added bigip_asm_policy_manage

* Update bigip_asm_policy_manage.py
6 years ago
Zim Kalinowski 756ad176cc fixed crash in facts (#50120) 6 years ago
Wojciech Wypior f761cc4077 added ASM policy server technology module (#50116)
* added ASM policy server technology module

* Update bigip_asm_policy_server_technology.py
6 years ago
Toshio Kuratomi bd072fe83a
Make the timeout decorator raise an exception out of the function's scope (#49921)
* Revert "allow caller to deal with timeout (#49449)"

This reverts commit 63279823a7.

Flawed on many levels

* Adds poor API to a public function
* Papers over the fact that the public function is doing something bad
  by catching exceptions it cannot handle in the first place
* Papers over the real cause of the issue which is a bug in the timeout
  decorator
* Doesn't reraise properly
* Catches the wrong exception

Fixes #49824
Fixes #49817

* Make the timeout decorator properly raise an exception outside of the function's scope

signal handlers which raise exceptions will never work well because the
exception can be raised anywhere in the called code.  This leads to
exception race conditions where the exceptions could end up being
hanlded by unintended pieces of the called code.

The timeout decorator was using just that idiom.  It was especially bad
because the decorator syntactically occurs outside of the called code
but because of the signal handler, the exception was being raised inside
of the called code.

This change uses a thread instead of a signal to manage the timeout in
parallel to the execution of the decorated function.  Since raising of
the exception happens inside of the decorator, now, instead of inside of
a signal handler, the timeout exception is raised from outside of the
called code as expected which makes reasoning about where exceptions are
to be expected intuitive again.

Fixes #43884

* Add a common case test.

Adding an integration test driven from our unittests.  Most of the time
we'll timeout in run_command which is running things in a subprocess.
Create a test for that specific case in case anything funky comes up
between threading and execve.

* Don't use OSError-based TimeoutError as a base class

Unlike most standard exceptions, OSError has a specific parameter list
with specific meanings.  Instead follow the example of other stdlib
functions, concurrent.futures and multiprocessing and define a separate
TimeoutException.

* Add comment and docstring to point out that this is not hte Python3 TimeoutError
6 years ago
Tom Dietrich 2b48c0187c Warn of standard behavior of 'default' key store (#49903)
* Warn of standard behavior of 'default' key store 

The default key store typically results in the key being stored as user. In instances where we're trying to install a cert to enable SSL binding in IIS, this will result in an unbind-able cert, as the IIS APPPOOL identity will not be able to read the private key, and presents a very cryptic error of 'A specified logon session does not exist'.


+label: docsite_pr

* fix trailing whitespace

* Use C(user) reference

* specify what's required for successful iis import

- store_location's default value is currently 'LocalMachine' but if this changes it could result in the documentation being inaccurate
- key_exportable is not required for a successful IIS import

* remove stray =

dang cat

Co-Authored-By: tdietrich513 <tom.dietrich@gmail.com>
6 years ago
Toshio Kuratomi 947c4300ee Fix return types
We're now stricter on naming the return types.  Replace string with str.
6 years ago
Dag Wieers 05c6ff79f9 Convert to reduced list of known types (#50010) 6 years ago
Toshio Kuratomi fcd1486b51 VALID_ACTIONS for cli subcommands will now be a frozenset (#50058) 6 years ago
Martin Krizek 545edc9114 facts: detect FreeBSD KVM guests (#50030)
Fixes: #49158
6 years ago
Martin Krizek 29c3bb48e9 facts: correctly detect multiple ipv6 addresses per device (#50020)
Fixes #49473
6 years ago
Yannig Perré 6b41588e93 Fix with_ini example and unittest
* Fix example in ini.py
* Fix unittest in test_ini.py to pass CI as latest ansible returns list in
  different order. To prevent such issues in future results are sorted
* PEP8 E501 styling improvements

Co-Authored-By: Sergii Golovatiuk <sgolovat@redhat.com>
6 years ago
Abhijeet Kasurde 1e4ab5a038 Return correct error message to user
botocore.exceptions.ClientError does not have message, which
fails fail_json.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
Abhijeet Kasurde 44bd8fc0a8 Update unit tests for configmanager
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
Jordan Borean efda3eaf1c
win_lineinfile - fix malformed returned json (#50066) 6 years ago
Michaël de Groot 13f2b29305 Small documentation update: Clarify daemon-reload always executing. (#49889)
* Small documentation update
* shortens and clarifies line
6 years ago
Michael Scherer 2734895c48 Do switch to apt if aptitude is not installed (#30738)
Trying to use the apt module on a freshly install 16.04 Ubuntu VM with
"ansible -m apt -a 'name=* state=latest' all" fail with this backtrace:

  Traceback (most recent call last):
    File \"/tmp/ansible_2inxygge/ansible_module_apt.py\", line 1055, in <module>
      main()
    File \"/tmp/ansible_2inxygge/ansible_module_apt.py\", line 998, in main
      upgrade(module, 'yes', force_yes, p['default_release'], use_apt_get, dpkg_options)
    File \"/tmp/ansible_2inxygge/ansible_module_apt.py\", line 759, in upgrade
      apt_cmd_path = m.get_bin_path(apt_cmd, required=True)
    File \"/tmp/ansible_2inxygge/ansible_modlib.zip/ansible/module_utils/basic.py\", line 2182, in get_bin_path
    File \"/usr/lib/python3.5/posixpath.py\", line 89, in join
      genericpath._check_arg_types('join', a, *p)
    File \"/usr/lib/python3.5/genericpath.py\", line 143, in _check_arg_types
      (funcname, s.__class__.__name__)) from None
    TypeError: join() argument must be str or bytes, not 'NoneType'

It seems that since aptitude is not installed on Xenial, so APTITUDE_CMD is None
and we later hit the bug in the upgrade function since it assume APTITUDE_CMD
is set.
6 years ago
Dag Wieers ee29ba5d4f plugin_formatter.py: Improve the output when processing docs (#46541)
* Improve the output when processing files

* Update docs/bin/plugin_formatter.py

Co-Authored-By: dagwieers <dag@wieers.com>

* Show progress indicator.

* Don't pp.pformat() huge structures when they aren't used anyway.

This saves ~10 seconds on my machine.

* Only show ASCII spinner if stdout is a TTY.

* Fix: E722 do not use bare 'except'
6 years ago
Toshio Kuratomi 40144c7486 Remove dead code in ansible-inventory
This piece of code is only needed with ansible < 2.3.x (which is now EOL)
6 years ago
Brian Coca 88c87a3583
added handlers_from (#49220)
* added handlers_from

fixes #46769
6 years ago
Xander Madsen 1e415899ad GetManagerNicInventory (#49961)
* Add GetManagerNicInventory command for Manager category, and tweak redfish_utils' get_nic_inventory to accommodate manager nic interfaces

* Remove get_manager_nic_inventory, since it is unnecessary while using get_manager in get_nic_inventory

* Rework get_nic_inventory() to take a resource_type as a string, which will be just the category parameter from redfish_facts, making it clearer

* remove extraneous blank line to conform with pep8

* Add GetManagerNicInventory example task to EXAMPLES docstring
6 years ago
Dag Wieers 15d39f9108 Sanity fixes in various modules (#50080) 6 years ago
Nathaniel Case 6caed0c38b
ios retry config if section filter fails (#49485)
* Attempt to work around devices that don't understand | section

* Fix case of no flags
6 years ago
rajaspachipulusu17 d28e700a22 Pluribus networks admin session timeout module with unit tests (#50012)
* Pluribus networks admin session timeout module with unit tests
* Doc fix
* Removed unused imports
* Removed unwanted global variable
6 years ago
Christian Kotte f123f894df Improve module vmware_local_role_manager (#47870)
* add check mode support
* improve output
6 years ago
Christian Kotte e65b721283 VMware: new module vmware_host_ad_auth (#47901) 6 years ago
Ondra Machacek e733d6e557 Fix activate of the disks in ovirt_vm and ovirt_disk modules (#49762)
* ovirt_disk: Add activate parameter

* ovirt_vm: Fix waiting on lun disks

Signed-off-by: Ondra Machacek <omachace@redhat.com>
6 years ago
Christian Kotte f431e5b0e2 VMware: new module vmware_dvswitch_uplink_pg (#48846) 6 years ago
Felix Fontein 92ef500185 openssl_privatekey: add ECC support (#49416)
* Add cryptography backend for openssl_privatekey.

* Adding ECC support.

No support for X25519 and X449, since they don't support serialization.

* Improve finterprint calculation to work with Python 3.

* Add fingerprint check.

* Fix typo.

* Use separate curve option for elliptic curves, and use type 'ECC'.

* Using curve names as defined in IANA registry.

* Bump minimal supported cryptography version. Older versions might work as well, but I couldn't test them.

* Improve documentation.
6 years ago
Zim Kalinowski 6d952e4124 fixing vm state change when vm created with attached disk (#50071)
* fixing vm state change when vm created with attached disk

* minor fixes

* fixing hanging indent
6 years ago
Dag Wieers c1ac87794e
ACI: Fix module parameters (#50051)
* Fix parameter type of private_key

* Fix parameters of various ACI modules
6 years ago
rajaspachipulusu17 cf00880ab3 Pluribus Networks dscp map module with unit tests (#49849)
* Pluribus Networks dscp map module with unit tests
* Doc string fix
6 years ago
rajaspachipulusu17 4d88cdd83a Pluribus Networks cpu class module with unit tests (#49847)
* Pluribus Networks cpu class module with unit tests
* Doc string fixes
6 years ago
Ganesh Nalawade 3163780829
Add force_host and issu options support in junos_package module (#50018)
Fixes #48171
Fixes #33742

Add force_host and issu options support in junos_package module
*  Add force_host option to ignore warnings while installing package
*  Add issu option to enable issu feature from Ansible
6 years ago
Dag Wieers 5739ccb6c3 PSRP: Add support for reconnection retries (#49772)
* PSRP: Add support for reconnection retries

This adds support for reconnection retries to overcome sudden Connection
Refused or other recoverable states. (Either because WinRM is (re)started,
or firewall changes make it briefly unavailable)

* Fixes from review comments
6 years ago
Dag Wieers 244c4c893d Add types to files fragment (#49996) 6 years ago
Gregory Storme f461025dbb fix facts memtotal_mb rounding on VMWare and swaptotal_mb conversion from KB to MB (#49940) 6 years ago
Jérémy Lecour 2fb9b46752 Lineinfile must not insert lines multiples times with insertbefore/insertafter (#49409)
* Change test suite to fit expected behaviour

This reverts some changes from ansible/ansible@723daf3
If a line is found in the file, exactly or via regexp matching, it must 
not be added again.
insertafter/insertbefore options are used only when a line is to be 
inserted, to specify where it must be added.

* Implement the change in behaviour mentioned in the previous commit

* Fix comment to reflect what the code does

* Set the correct return message.

In these cases, the lines are added, not replaced.

* Add a changelog
6 years ago
Matt Martz 7eb1ab45a7
Allow tags to be templated from a variable (#49833)
* Allow tags to be templated from a variable. Fixes #49825

* Restore _load_tags to ensure we do csv tag splitting

* Add tests for csv tags and templated tags

* evaluate_tags doesn't need to accept strings, because _load_tags handles this
6 years ago
Matt Martz a0d71e7735
Fix reverse_inventory order to work on python3 (#49895) 6 years ago
Aleksander Kovtunenko ba562043e1 changed if logic Type to boolean (#49628)
* changed Type to boolean

* fix after review

* created fragment
6 years ago
Dag Wieers a8292778f0 Fix GitHub handle, use keachi (#50043)
* Fix GitHub handle, use keachi

* Add UTF8 name
6 years ago
Toshio Kuratomi 61b1daa65f Port from plaform.dist to ansible.module_utils.distro.linux_distribution
ci_complete
6 years ago
Adrian Likins 78a8d09082 Changes to bundled distro to be Python-2.6 compatible
* Port bundled distro to use optparse instead of argparse (py2.6)
* Use an absolute import to satisfy the current import testing harness
* Port from subprocess.check_output to subprocess.Popen.communicate() (py2.6)
* Add license location

The changes have been proposed upstream here:
https://github.com/nir0s/distro/pull/232

Upstream is contemplating a branch where everyone wanting python-2.6
support can collaborate without it becoming part of the regularly
supported releases.
6 years ago
Adrian Likins 5e1f8a48f3 Bundle a copy of github.com/nir0s/distro/distro.py
Since the 'platform.dist()' and 'platform.linux_distribution()'
methods will be removed from future versions of python, this
provides an alternative to replace ansibles use of those
methods.

lib/ansible/module_utils/distro.py is a copy of
https://github.com/nir0s/distro/blob/master/distro.py

This module is originally from https://github.com/nir0s/distro
and is license under the Apache License, Version 2.0.
6 years ago
Nathaniel Case bf4ad56479
Move errors from import to connect (#50034) 6 years ago
Dag Wieers d4ee599fe9 Add types to common url parameters (#50000) 6 years ago
Dag Wieers 00a83035f2 Meraki: Add types to common parameters (#49998) 6 years ago
Dag Wieers 0eb2924380 MSC: Add type to common module parameters (#49999) 6 years ago
Dag Wieers e8885ee4e8 ACI: Add types to modules and doc fragment (#49997)
* ACI: Add types to module doc fragment

* Add types to ACI modules too
6 years ago
Dag Wieers b3f062b5ca Clean up backup doc fragment (#49995) 6 years ago
Dag Wieers 3bcc0c0498 Add types to vmware REST client/VCA doc fragments (#50001) 6 years ago
Dag Wieers 653c3da500 Fix document references in modules (#49892)
* Docs: Fixes internal module reference syntax for seealso
* Updates anchors and links
* Updates seealso in the docs for module **win_chocolatey**.
6 years ago
Martin Nečas 651ea5da44 add to ovirt snapshot download and upload disk (#46696)
* add to ovirt snapshot download and upload disk

* ovirt snapshot update docs

* ovirt snapshot add version_added to docs

* update ovirt snapshot docs
6 years ago
Johannes Brunswicker 87ee59b8d7 Sophos UTM - add module to handle utm ca host key certificate entries (#48927)
* - add module to handle utm ca host key certificate entries

* - fixed typos in doc

* Apply suggestions from code review

Co-Authored-By: MatrixCrawler <johannes.brunswicker@gmail.com>
6 years ago
Andrey Klychkov b5ca54eeed New module - postgresql_idx (#49684)
* New module - postgresql_idx

* New module postgresql_idx: added returns block

* New module postgresql_idx: fixed documentation, typos and added idxname to fail_json
6 years ago
Dag Wieers ba573777ba Add types to docker module fragments (#50002) 6 years ago
Deepak Agrawal 0f2f38b044
network_cli - ansible_command_timeout not working as expected (#49922)
* fix for command_timeout

Signed-off-by: Deepak Agrawal <deepacks@gmail.com>

* fix ci warning

Signed-off-by: Deepak Agrawal <deepacks@gmail.com>

* fix review comments

Signed-off-by: Deepak Agrawal <deepacks@gmail.com>
6 years ago
f-bor 134c1a624e new network module: edgeswitch_vlan (#48041)
* initial commit

* better commands generation
6 years ago
anasbadaha 1580afbd62 Fixes #46410 Onyx show facts module does not work for onyx version 3.6.6000 and higher (#49414)
Signed-off-by: Anas Badaha <anasb@mellanox.com>
6 years ago
anasbadaha 369354547e Issue: 46475 Fix onyx magp module for supporting new json format (#49417)
Signed-off-by: Anas Badaha <anasb@mellanox.com>
6 years ago
Zim Kalinowski de3d188cdd
support lro in azure_rm_resource (#49919) 6 years ago
Toshio Kuratomi 175f3b51e5 Ensure that current uses of BaseException are required
* In some cases, it appears that Exception should have been used instead
  as there's no need to catch sys.exit KeyboardInterrupt and similar.
* In a few cases, it appears that BaseException is used because
  a library we depend on calls sys.exit() contrary to good coding
  design.  Comment those so that we know that those have been audited
  and found to be correct and change to use (Exception, SystemExit)
  instead.
6 years ago
Toshio Kuratomi 3fba006207 Update bare exceptions to specify Exception.
This will keep us from accidentally catching program-exiting exceptions
like KeyboardInterupt and SystemExit.
6 years ago
Felix Fontein 65d5f1a4ef Fix stacktrace when fail_on_error is False and a file cannot be parsed. (#49987) 6 years ago
anasbadaha c0dbc1a441 Issue/38837 (#49873)
* Fix Issue #38837

Signed-off-by: Anas Badaha <anasb@mellanox.com>

* Fix Issue #38837 2

Signed-off-by: Anas Badaha <anasb@mellanox.com>

* Enhance decumentation

Signed-off-by: Anas Badaha <anasb@mellanox.com>

* Fix Failures in Shippable

Signed-off-by: Anas Badaha <anasb@mellanox.com>

* Fix Version Added

Signed-off-by: Anas Badaha <anasb@mellanox.com>

* Add version_added:2.8 in purge attributes

Signed-off-by: Anas Badaha <anasb@mellanox.com>
6 years ago
Abhijeet Kasurde 1558f77081
AWS: make jittered_backoff API parameter configurable (#49086)
* AWS: make jittered_backoff API parameter configurable
* Review comments
* minor doc changes

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
Abhijeet Kasurde 162d9497ba
Ad-hoc command: fix 'any' call in play_ds (#49852)
* Ad-hoc command: fix 'any' call in play_ds
* Unit test for ad-hoc cli
* Review comments

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
Abhijeet Kasurde ef3b75afcd
fortimanager: Correct example documentation (#49925)
Fixes: #49813

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
Dag Wieers 26474c6902
Add seealso section to Windows and related modules (#49845)
* Add seealso section to Windows and related modules

* Fixes after review
6 years ago
Adam Miller 0eabb8097b
Fix yum/dnf handling of URIs that don't end in .rpm (#49912)
Fixes #49727

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