Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add eda modules to the collection #175

Closed
Closed
2 changes: 1 addition & 1 deletion .flake8
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[flake8]
# matches black's default
max-line-length = 88
extend-ignore = E203
extend-ignore = E203, E402
7 changes: 6 additions & 1 deletion extensions/eda/plugins/event_source/kafka.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,11 @@ async def put(self: "MockQueue", event: dict) -> None:
asyncio.run(
main(
MockQueue(),
{"topic": "eda", "host": "localhost", "port": "9092", "group_id": "test"},
{
"topic": "eda",
"host": "localhost",
"port": "9092",
"group_id": "test",
},
),
)
13 changes: 8 additions & 5 deletions plugins/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# Collections Plugins Directory

This directory can be used to ship various plugins inside an Ansible collection. Each plugin is placed in a folder that
is named after the type of plugin it is in. It can also include the `module_utils` and `modules` directory that
would contain module utils and modules respectively.
This directory can be used to ship various plugins inside an Ansible
collection. Each plugin is placed in a folder that is named after the type
of plugin it is in. It can also include the `module_utils` and `modules`
directory that would contain module utils and modules respectively.

Here is an example directory of the majority of plugins currently supported by Ansible:
Here is an example directory of the majority of plugins currently supported
by Ansible:

```
└── plugins
Expand All @@ -28,4 +30,5 @@ Here is an example directory of the majority of plugins currently supported by A
└── vars
```

A full list of plugin types can be found at [Working With Plugins](https://docs.ansible.com/ansible/latest/plugins/plugins.html).
A full list of plugin types can be found at [Working With Plugins]
(https://docs.ansible.com/ansible/latest/plugins/plugins.html).
45 changes: 45 additions & 0 deletions plugins/doc_fragments/auth.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# -*- coding: utf-8 -*-

# Copyright: (c) 2023, Nikhil Jain <nikjain@redhat.com> GNU General Public
# License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)

from __future__ import absolute_import, division, print_function

__metaclass__ = type


class ModuleDocFragment(object):
# Automation Platform EDA Controller documentation fragment
DOCUMENTATION = r"""
options:
eda_controller_host:
description:
- URL to your Ansible Automation Platform EDA Controller instance.
- If value not set, will try environment variable C(EDA_CONTROLLER_HOST)
type: str
eda_controller_username:
description:
- Username for your Ansible Automation Platform EDA Controller instance.
- If value not set, will try environment variable C(EDA_CONTROLLER_USERNAME)
type: str
eda_controller_password:
description:
- Password for your Ansible Automation Platform EDA Controller instance.
- If value not set, will try environment variable C(EDA_CONTROLLER_PASSWORD)
type: str
validate_certs:
description:
- Whether to allow insecure connections to Ansible Automation Platform EDA
Controller instance.
- If C(no), SSL certificates will not be validated.
- This should only be used on personally controlled sites using self-signed
certificates.
- If value not set, will try environment variable C(EDA_CONTROLLER_VERIFY_SSL)
type: bool
request_timeout:
description:
- Specify the timeout Ansible should use in requests to the eda controller host.
- Defaults to 10s, but this is handled by the shared module_utils code
- If value not set, will try environment variable C(EDA_CONTROLLER_REQUEST_TIMEOUT)
type: float
"""