1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
Commit graph

73 commits

Author SHA1 Message Date
Felix Fontein
2830a3452d
Remove deprecated features, bump version to 6.0.0 (#5326)
* Bump version to 6.0.0.

* sender option is now required.

* Default of want_proxmox_nodes_ansible_host changed from true to false.

* username is now an alias of user, and no longer of workspace.

* Remove deprecated return values in favor of end_state.

* Remove debug option.

* Change default of ignore_volatile_options from true to false.

* gitlab_group must now always contain the full path.

* Change default of norc from false to ture.

* Remove deprecated property.

* Add PR URL.

* Adjust bitbucket unit tests.

* Adjust module_helper integration test.
2022-10-25 08:07:21 +02:00
Victor Martinez
5732023aa2
[opentelemetry][callback] support opentelemetry-api 1.13 (#5342)
* [opentelemetry][callback] support opentelemetry-api 1.13

* [opentelemetry][callback] changelog fragment

* Update changelogs/fragments/5342-opentelemetry_bug_fix_opentelemetry-api-1.13.yml

Co-authored-by: Felix Fontein <felix@fontein.de>

* [opentelemetry-callback] refactor time_ns in a function

* fix linting

* change branch outside of the function

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>

* [opentelemetry]: remove options from suggestion

* Apply suggestions from code review

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2022-10-18 09:16:11 +02:00
Victor Martinez
8c04133284
opentelemetry: send logs (#4175)
* opentelemetry: logs property

* opentelemetry: support for span events with the Task dump output

* opentelemetry: support property to disable the logs

* bump the version when supported

* add section ini

* test: fix change of signature

* [opentelemetry][callback] changelog fragment

* Apply suggestions from code review

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-10-10 20:54:52 +02:00
Felix Fontein
015566fb06
Normalize more booleans. (#5247) 2022-09-06 20:42:17 +02:00
Felix Fontein
19ce50f6b9
Adjust booleans in misc plugins. (#5161) 2022-08-24 20:00:39 +02:00
Felix Fontein
a54af8909c
Fix linting errors; fix some real bugs (#5111)
* Fix linting errors.

* Fix bugs.

* Another linter error ignored.

* More fixes.

* Ignore sanity errors with older versions.

ci_complete

* Forgot to commit more changes.
2022-08-12 11:07:30 +02:00
Felix Fontein
424d706f92
Fix more copyright lines, add more default copyright lines (#5095)
* Fix copyright lines.

* Add default copyright line.
2022-08-08 14:24:58 +02:00
Felix Fontein
2a9fd7359f
Add more license statements (#5079)
* Add more license statements. These were modified manually incorporating existing data.

* Remove accidentally added line.
2022-08-07 13:37:23 +02:00
Felix Fontein
496bf27b5c
Fix copyright lines (make sure 'Copyright' is there). (#5083) 2022-08-05 22:12:10 +02:00
Felix Fontein
123c7efe5e
Move licenses to LICENSES/, run add-license.py, add LICENSES/MIT.txt (#5065)
* Move licenses to LICENSES/, run add-license.py, add LICENSES/MIT.txt.

* Replace 'Copyright:' with 'Copyright'

sed -i 's|Copyright:\(.*\)|Copyright\1|' $(rg -l 'Copyright:')

Co-authored-by: Maxwell G <gotmax@e.email>
2022-08-05 12:28:29 +02:00
Evgeni Golov
a5ff53f2ae
allow configuring opentelementry callback via config file (#4916)
this is especially useful for the `enable_from_environment` option, as
this allows to set a default for the whole project, instead of relying
on everyone setting the environment variable
2022-07-07 21:51:04 +02:00
Felix Fontein
aa4c994dfd
Fix docs. (#4881) 2022-06-22 13:36:23 +02:00
Jan-Piet Mens
e57fc54a10
Clarify ansible_pre_command_output (#4636)
##### SUMMARY
Clarify what ansible_pre_command_output actually is

##### ISSUE TYPE
- Docs Pull Request

+label: docsite_pr
2022-05-08 08:45:55 +02:00
Victor Martinez
9f702946cd
[opentelemetry][callback] fix hardcoded value for ansible_task_message (#4624)
* [opentelemetry][callback] fix hardcoded value for ansible_task_message

* opentelemetry: add changelog fragment
2022-05-05 12:42:59 +02:00
Victor Martinez
841b46ff6a
[opentelemetry][callback] fix warning when using the include_tasks (#4623)
* opentelemetry: fix include_tasks missing _task_fields

* opentelemetry: add uts for the include_tasks

* opentelemetry: add changelog fragment

* pep8: fix spaces
2022-05-05 08:21:16 +02:00
Felix Fontein
7743ecd776
Replace symlinks with meta/runtime.yml redirects. (#4562) 2022-04-26 20:33:13 +02:00
Felix Fontein
1a9b3214fd
[5.0.0] Remove Ansible 2.9 / ansible-base 2.10 compatibility code (#4548)
* Remove Ansible 2.9 / ansible-base 2.10 compatibility code.

* Remove path_join shim from BOTMETA.

* Update comment.

* Bump minimally required ansible-core version.
2022-04-26 11:51:01 +02:00
andrewroffey
9c3704bd00
[plugins/callback/syslog_json.py] use v2 api, add option to skip sysl… (#4223)
* [plugins/callback/syslog_json.py] use v2 api, add option to skip syslog on gather_facts

* Update plugins/callback/syslog_json.py

Add version

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update plugins/callback/syslog_json.py

consistency for description

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update plugins/callback/syslog_json.py

ANSIBLE_ environment variable prefix

Co-authored-by: Felix Fontein <felix@fontein.de>

* add changelog fragment for PR 4223

* Update changelogs/fragments/4223-syslog-json-skip-syslog-option.yml

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-03-03 07:33:29 +01:00
Lénaïc Huard
8682ac96df
mail: fix the encoding of the mail senders and recipients name (#4061) 2022-02-18 21:58:46 +01:00
Victor Martinez
aa554c2887
opentelemetry: enrich services for jenkins, hetzner or jira (#4105)
* opentelemetry: enrich services for jenkins, hetzner, jira, zypper, chocolatey

* remove source and name for the time being

Those arguments can be later on in the future added, maybe with some opt-in feature, so let's only focus in the ones which are fully http based for now

* changelog fragment

* Update changelogs/fragments/4105-opentelemetry_plugin-enrich_jira_hetzner_jenkins_services.yaml

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-02-12 09:31:00 +01:00
Felix Fontein
e09254df91
mail callback: fully use Ansible's option handling; deprecate not specifying sender (#4140)
* Fully use Ansible's option handling. Deprecate not specifying sender.

* Update plugins/callback/mail.py

Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>

Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
2022-02-01 10:12:03 +01:00
Victor Martinez
e793e2e94f
opentelemetry: enrich service for community.docker.docker_login (#4104)
* opentelemetry: support service for community.docker.docker_login

* changelog
2022-01-29 15:13:36 +01:00
Lénaïc Huard
750d96a95f
mail: add Date and Message-ID headers (#4056) 2022-01-21 07:27:20 +01:00
Lénaïc Huard
c7500c217f
Fix exception in the mail callback plugin (#4026) 2022-01-20 08:31:09 +01:00
NixM0nk3y
5540dab382
opentelemetry: no_log:true causes exception when generating trace (#4043)
* dont check for urls when args is None

* add changelog fragment

* fix lint on changelog fragment

Co-authored-by: Nick Gregory <nick.gregory@openenterprise.co.uk>
2022-01-17 18:50:19 +01:00
Felix Fontein
77b7b4f75b
Get rid of distutils.spawn and distutils.util (#3934)
* Replace distutils.spawn.find_executable.

* Replace distutils.util.strtobool.
2022-01-04 06:56:28 +01:00
Jesse Harris
40ffd559ac
Fix nrdp string arguments without an encoding (#3909)
* Fix nrdp string arguments without an encoding

* added changelog fragment

Signed-off-by: Jesse Harris <zigford@gmail.com>

* Update changelogs/fragments/3909-nrdp_fix_string_args_without_encoding.yaml

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-12-17 17:06:20 +01:00
Victor Martinez
ce6d0a749e
opentelemetry: honour ignore errors (#3837)
* opentelemetry: honour the ignore_errors

* fix-encoding-pragma

* Add changelog fragment

* opentelemetry: ignore produces unset span status
2021-12-04 19:00:07 +01:00
Nabheet Sandhu
f5b4dcc564
Enable counter_enabled.py to support batch mode (#3709)
* Enable counter_enabled.py to support serial mode

Enable counter_enabled.py to support batch playbook executions using the serial tag in plays. Currently, the host counter gets reset at the beginning of every task. However, during batch executions we want it to keep track of the previous batch executions and print the host counter based on the previous runs. This proposal keeps track of how many servers have been updated in previous batches and starts the host counter at that tracked value.

```
- hosts: allthethings
  gather_facts: no
  serial:
    - 3
    - 15%
    - 20%
    - 35%
    - 55%
    - 90%
    - 100%
  tasks:
    - name: Ping Hello!
      ping:
        data: "Hello!!!!"
```

* Reset task counter on play start

Reset task counter on play start for batch mode playbook executions.

* Add changelog fragment

* change changelog fragment after feedback

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-11-15 21:39:51 +01:00
Victor Martinez
a362879ff6
[opentelemetry][callback] Support loops error handling (#3599)
* [opentelemetry][callback] simplify condition

* [opentelemetry][callback] initial support for loops

* [opentelemetry][callback] support for loops

* [opentelemetry][callback] enrich loop message with action and item

* [opentelemetry][callback] add UTs for get_error_message_from_results

* [opentelemetry][callback] add UTs for enrich_error_message_from_results

* [opentelemetry][callback] add changelog fragment

* Update plugins/callback/opentelemetry.py

Co-authored-by: Ajpantuso <ajpantuso@gmail.com>

Co-authored-by: Ajpantuso <ajpantuso@gmail.com>
2021-10-27 07:51:49 +02:00
Victor Martinez
7e1412e5e1
[opentelemetry][callback] transform args attribute in a list of attributes with redacted user/pass in URL values (#3564)
* [callback][opentelemetry] list of attributes for arguments

* [opentelemetry][callback] list of attributes for the args and redact user/pass from http

* [opentelemetry][callback] remove unused imports

* [opentelemetry][callback] fix E713

* [opentelemetry][callback] remove unused static method

* [opentelemetry][callback] remove duplicated functions

* Apply suggestions from code review

Co-authored-by: Ajpantuso <ajpantuso@gmail.com>

* [opentelemetry][callback] fix ident

* [opentelemetry][callback] add changelog fragment

Co-authored-by: Ajpantuso <ajpantuso@gmail.com>
2021-10-24 19:00:00 +02:00
Victor Martinez
d9e8724b1d
[callback][opentelemetry] enrich span with http attributes (#3558)
* [callback][elastic] enrich span with http attributes

* [callback][opentelemetry] fix linting

* [callback][opentelemetry] fix UTs

* [opentelemetry][changelog] add fragment for the service map feature

* Update plugins/callback/opentelemetry.py

Co-authored-by: Ajpantuso <ajpantuso@gmail.com>

* [opentelemetry][callback] remove comments

* [opentelemetry][callback] fix UTs

* [opentelemetry][callback] return the value

otherwise a None value returns ParseResultBytes when using urlparse(None)

* [opentelemetry][callback] fix wrong parameter order

* [opentelemetry][callback] support for no interpolated URLs

* [opentelemetry][callback] support for URLs without interpolation in the hostname

* [opentelemetry][callback] fix linting

* Update changelogs/fragments/3558-callback_opentelemetry-enrich_service_map.yml

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Ajpantuso <ajpantuso@gmail.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2021-10-20 17:24:14 +02:00
Victor Martinez
18f8195983
[callback][elastic] enrich stacktrace errors (#3556)
* [callback][elastic] enrich stacktrace errors

* [callback][elastic] add changelog fragment
2021-10-14 21:19:02 +02:00
Anand Victor
7038812465
Bugfix issue2692 logstash callbackmodule with no attribute options (#3530)
* Update logstash.py

replacing _options with context.cliargs

* Create 2692-logstash-callback-plugin-replacing_options

logstash callback plugin replace _option with context.CLIARGS

* Rename 2692-logstash-callback-plugin-replacing_options to 2692-logstash-callback-plugin-replacing_options.yml

missed out the extenstion

* Update logstash.py

context imported

* Update 2692-logstash-callback-plugin-replacing_options.yml

dict to string

* Update changelogs/fragments/2692-logstash-callback-plugin-replacing_options.yml

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-10-11 22:55:18 +02:00
Victor Martinez
905f4dcfa2
Add elastic callback plugin (#3380)
* Add elastic callback plugin

* Capture task failures

* Catch errors and add UTs

* Skip 3.5< python versions and install dependency

* fix lint

* Fix linting

* Fix linting

* Add botmeta

* Apply suggestions from code review

Co-authored-by: Felix Fontein <felix@fontein.de>

* It's not required

* As suggested in the code review OrderedDict has been added to the Python stdlib since version 2.7

* Update plugins/callback/elastic.py

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-10-11 06:54:14 +02:00
Victor Martinez
3a460751a4
[opentelemetry][callback] add option to support enabling plugin in the CI (#3498)
* [opentelemetry][callback] add option to support enabling plugin in the CI only

* [opentelemetry][callback] add changelog fragment

* Apply suggestions from code review

Co-authored-by: Ajpantuso <ajpantuso@gmail.com>

* [opentelemetry][callback] use enable_from_environment

* Apply suggestions from code review

Co-authored-by: Felix Fontein <felix@fontein.de>

* [opentelemetry] ensure the value is true otherwise the plugin is not enabled

* [opentelemetry][changelog] update entry with the new option

Co-authored-by: Ajpantuso <ajpantuso@gmail.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2021-10-07 15:31:08 +02:00
Victor Martinez
e22fff2b12
[opentelemetry][callback] enrich stacktrace errors (#3496)
* [opentelemetry][callback] refactor get_error_message and add UTs

* [opentelemetry][callback] enrich exception with msg, exception and stderr fields

* [opentelemetry] fix linting

* [opentelemetry][callback] add changelog fragment

* Apply suggestions from code review

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Ajpantuso <ajpantuso@gmail.com>

* [opentelemetry][callback] chore: remove comment

* [opentelemetry][callback] refactor tests

* [opentelemetry] refactor UTs

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Ajpantuso <ajpantuso@gmail.com>
2021-10-07 06:59:03 +02:00
Felix Fontein
5895e50185
yaml callback: prevent plugin from modifying PyYAML (#3478)
* Prevent yaml callback from modifying PyYAML.

* Fix changelog fragment.

* Update changelogs/fragments/3478-yaml-callback.yml

Co-authored-by: Brian Scholer <1260690+briantist@users.noreply.github.com>

Co-authored-by: Brian Scholer <1260690+briantist@users.noreply.github.com>
2021-10-01 22:42:39 +02:00
Victor Martinez
774b2f642b
[opentelemetry] minor changes in the import, docs and exception (#3450)
* OrderedDict has been added to the Python stdlib since version 2.7

* Docs: cosmetic change in the python lib

* See https://github.com/ansible/ansible/issues/75726

* Add changelog fragment

* Apply suggestions from code review

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-10-01 14:39:22 +02:00
Victor Martinez
06345839c6
opentelemetry callback: context propagation and error exception (#3378)
* opentelemetry callback: context propagation and error exception

* Apply suggestions from code review

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-09-16 20:22:44 +02:00
Victor Martinez
517570a64f
Add opentelemetry callback plugin (#3091)
* Add opentelemetry callback plugin

* Apply suggestions from code review

Co-authored-by: Felix Fontein <felix@fontein.de>

* Formatting (text), booleans and renamed env variables

* This should be done in a future release

* Remove insecure in favour of the OTEL env variable. Add descriptions

* Use OpenTelemetrySource

* Move generate_distributed_traces

* Move update_span_data and set_span_attribute

* Move finish_task

* Move start_task

* Refactor to support UTs

* Add first UT

* Fix codestyle

* opentelemetry callback entry in the botmeta

* Fix linting

* Fix signature

* Mock methods

* Use MagicMock

* Mock the methods

* UT for transform_to_boolean_or_default

* Fix linting

* Set test data

* Mock _time_ns

* Exclude tests for python <= 3.6

* Remove obsoleted setup task type configuration

* Remove unused docs

* Apply suggestions from code review

Co-authored-by: Felix Fontein <felix@fontein.de>

* Fix docs

* unrequired logic that was originally took from https://github.com/ansible/ansible/blob/devel/lib/ansible/plugins/callback/junit.py\#L226

* Use raise_from for the required dependencies

* Fix linting

* Add requirements for the UTs

* add missing dependency for the opentelemetry plugin in the UTs

* Add ANSIBLE_ prefix for the ansible specific options

* Add more context in the docs and remove duplicated docs

* As suggested in the code review

* Verify if the OTEL env variables for the endpoint were set

* Fix docs typo

* Fix linting

* Revert "Fix linting"

This reverts commit 3a54c827c5472553a6baf5598bc76a0f63f020c1.

* Revert "Verify if the OTEL env variables for the endpoint were set"

This reverts commit cab9d8648899c28c0345745690c4ec7a41f7e680.

* Remove console_output as suggested

* Apply suggestions from code review

Co-authored-by: flowerysong <junk+github@flowerysong.com>

* Delegate the definition of OTEL_EXPORTER_OTLP_INSECURE to the user

* Move definitions above, close to the class that uses them

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: flowerysong <junk+github@flowerysong.com>
2021-09-14 21:05:02 +02:00
Felix Fontein
1fec1d0c81
Fix new devel sanity errors. (#3194) 2021-08-12 12:07:50 +02:00
Alexei Znamensky
da11a98cb7
fixed the utf-8 marker (#3162) 2021-08-07 15:02:21 +02:00
Alexei Znamensky
73c27d6a0e
utf8 marker batch1 (#3127)
* added utf-8 markers to all .py files in plugins/{action,cache,callback}

* added utf-8 markers to all .py files in plugins/connection

* added utf-8 markers to all .py files in plugins/doc_fragments
2021-08-01 12:35:08 +02:00
Felix Fontein
1b94d09209
Add option type validation. (#2878) 2021-06-27 09:57:51 +02:00
Felix Fontein
fafabed9e6
Replace ansible.module_utils._text by ansible.module_utils.common.text.converters (#2877)
* Replace ansible.module_utils._text by ansible.module_utils.common.text.converters.

* Also adjust tests.
2021-06-26 23:59:11 +02:00
Ajpantuso
3ca98c2edd
callback_splunk - Add user-configurable event correlation id (#2790)
* Initial commit

* Adding changelog fragment

* Updating batch description

* Update plugins/callback/splunk.py

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-06-16 22:28:09 +04:30
Felix Fontein
7cd96d963e
meta/runtime.yml and __init__.py cleanup (#2632)
* Remove superfluous __init__.py files.

* Reformat and sort meta/runtime.yml.

* The ovirt modules have been removed.

* Add changelog entry.
2021-05-27 18:49:26 +02:00
Felix Fontein
6a72c3b338
Make plugins pass validation. (#2414) 2021-05-03 13:22:11 +02:00
zhcli
19db6f24f7
Callback plugin: Azure Log Analytics (#2091)
* adding plugins/callback/loganalytics.py

* * fixed sanity check issues
* adjusted documentation and license sections

* added changelogs fragment

* * added unit test
* documentation updated

* updated changelogs

* further docuement update

* minor fixes

* updated unittest

* suggested updates from community

* remove AnsibleError section
2021-03-30 12:12:26 +02:00