Skip to content

Commit

Permalink
#45 Added Modules for Checkly API (#47)
Browse files Browse the repository at this point in the history
* #45 Added Modules for Checkly API

* typo fixed

* added modules for checkly alert channels

* * added more module for checkly

* typo fix

* * added checkly snippets API modules

* added new info module for maintenance window

* remove extra variables

* added maintenance window module

* * added new infor module for dashboards
* update info module to return `result` as output keyword

* * added dashboard module
* update return keyword to `result`

* added check group info module

* added info module about checks

* ansible lint

* lin fix

* added checks api module

* lint fix

* * added check groups module
* minor fixes to tags

* remove extra task
  • Loading branch information
116davinder committed Sep 11, 2021
1 parent bb7872a commit f2ab261
Show file tree
Hide file tree
Showing 70 changed files with 9,403 additions and 5 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/ci-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,18 @@ jobs:
with:
python-version: '3.x'

- name: Run ansible-lint
uses: ansible/ansible-lint-action@master
with:
targets: |
tests/*.yaml
tests/*/*.yaml
tests/*/*/*.yaml
env:
ANSIBLE_MODULE_UTILS: plugins/module_utils
ANSIBLE_LIBRARY: plugins/modules
ANSIBLE_DOC_FRAGMENT_PLUGINS: plugins/doc_fragments

- name: Install test dependencies.
run: pip3 install pycodestyle yamllint

Expand Down
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,27 @@ Name | Description
[community.missing_collection.aws_worklink_info](https://github.com/116davinder/ansible.missing_collection/blob/master/docs/community.missing_collection.aws_worklink_info_module.rst)|Get Information about Amazon WorkLink.
[community.missing_collection.aws_workmail_info](https://github.com/116davinder/ansible.missing_collection/blob/master/docs/community.missing_collection.aws_workmail_info_module.rst)|Get Information about Amazon WorkMail.
[community.missing_collection.capabilities_info](https://github.com/116davinder/ansible.missing_collection/blob/master/docs/community.missing_collection.capabilities_info_module.rst)|Get information about linux capability of given file.
[community.missing_collection.checkly_account_info](https://github.com/116davinder/ansible.missing_collection/blob/master/docs/community.missing_collection.checkly_account_info_module.rst)|Get information from checkly about Account.
[community.missing_collection.checkly_alert_channels](https://github.com/116davinder/ansible.missing_collection/blob/master/docs/community.missing_collection.checkly_alert_channels_module.rst)|Management of the checkly Alert Channels.
[community.missing_collection.checkly_alert_channels_info](https://github.com/116davinder/ansible.missing_collection/blob/master/docs/community.missing_collection.checkly_alert_channels_info_module.rst)|Get information about checkly Alert Channels.
[community.missing_collection.checkly_check_groups](https://github.com/116davinder/ansible.missing_collection/blob/master/docs/community.missing_collection.checkly_check_groups_module.rst)|Management of the checkly Check Groups.
[community.missing_collection.checkly_check_groups_info](https://github.com/116davinder/ansible.missing_collection/blob/master/docs/community.missing_collection.checkly_check_groups_info_module.rst)|Get information about checkly check groups.
[community.missing_collection.checkly_check_results_info](https://github.com/116davinder/ansible.missing_collection/blob/master/docs/community.missing_collection.checkly_check_results_info_module.rst)|Get information from checkly about Check Results.
[community.missing_collection.checkly_check_results_rolled_up_info](https://github.com/116davinder/ansible.missing_collection/blob/master/docs/community.missing_collection.checkly_check_results_rolled_up_info_module.rst)|Get information from checkly about Check Results (Rolled Up).
[community.missing_collection.checkly_check_statuses_info](https://github.com/116davinder/ansible.missing_collection/blob/master/docs/community.missing_collection.checkly_check_statuses_info_module.rst)|Get information from checkly about check statuses.
[community.missing_collection.checkly_checks](https://github.com/116davinder/ansible.missing_collection/blob/master/docs/community.missing_collection.checkly_checks_module.rst)|Management of the checkly Checks.
[community.missing_collection.checkly_checks_info](https://github.com/116davinder/ansible.missing_collection/blob/master/docs/community.missing_collection.checkly_checks_info_module.rst)|Get information about checkly checks.
[community.missing_collection.checkly_dashboards](https://github.com/116davinder/ansible.missing_collection/blob/master/docs/community.missing_collection.checkly_dashboards_module.rst)|Management of the checkly Dashboards.
[community.missing_collection.checkly_dashboards_info](https://github.com/116davinder/ansible.missing_collection/blob/master/docs/community.missing_collection.checkly_dashboards_info_module.rst)|Get information about checkly dashboards.
[community.missing_collection.checkly_locations_info](https://github.com/116davinder/ansible.missing_collection/blob/master/docs/community.missing_collection.checkly_locations_info_module.rst)|Get information from checkly about Locations.
[community.missing_collection.checkly_mw](https://github.com/116davinder/ansible.missing_collection/blob/master/docs/community.missing_collection.checkly_mw_module.rst)|Management of the checkly maintenance windows.
[community.missing_collection.checkly_mw_info](https://github.com/116davinder/ansible.missing_collection/blob/master/docs/community.missing_collection.checkly_mw_info_module.rst)|Get information about checkly Maintenance windows.
[community.missing_collection.checkly_reporting_info](https://github.com/116davinder/ansible.missing_collection/blob/master/docs/community.missing_collection.checkly_reporting_info_module.rst)|Generates a report with aggregate statistics for checks and check groups.
[community.missing_collection.checkly_runtimes_info](https://github.com/116davinder/ansible.missing_collection/blob/master/docs/community.missing_collection.checkly_runtimes_info_module.rst)|Get information from checkly about Runtimes.
[community.missing_collection.checkly_snippets](https://github.com/116davinder/ansible.missing_collection/blob/master/docs/community.missing_collection.checkly_snippets_module.rst)|Management of the checkly Snippets.
[community.missing_collection.checkly_snippets_info](https://github.com/116davinder/ansible.missing_collection/blob/master/docs/community.missing_collection.checkly_snippets_info_module.rst)|Get information about checkly snippets.
[community.missing_collection.checkly_variables](https://github.com/116davinder/ansible.missing_collection/blob/master/docs/community.missing_collection.checkly_variables_module.rst)|Management of the checkly environment variables.
[community.missing_collection.checkly_variables_info](https://github.com/116davinder/ansible.missing_collection/blob/master/docs/community.missing_collection.checkly_variables_info_module.rst)|Get information about checkly environment variables.
[community.missing_collection.couchdb_db](https://github.com/116davinder/ansible.missing_collection/blob/master/docs/community.missing_collection.couchdb_db_module.rst)|Create/Delete Couchdb Database.
[community.missing_collection.couchdb_db_info](https://github.com/116davinder/ansible.missing_collection/blob/master/docs/community.missing_collection.couchdb_db_info_module.rst)|Get information about Couchdb Database.
[community.missing_collection.couchdb_info](https://github.com/116davinder/ansible.missing_collection/blob/master/docs/community.missing_collection.couchdb_info_module.rst)|Get information about Couchdb Cluster.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Parameters
<td>
</td>
<td>
<div>path of the binary/file to check.</div>
<div>path of the file.</div>
</td>
</tr>
</table>
Expand Down
132 changes: 132 additions & 0 deletions docs/community.missing_collection.checkly_account_info_module.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
.. _community.missing_collection.checkly_account_info_module:


*************************************************
community.missing_collection.checkly_account_info
*************************************************

**Get information from checkly about Account.**


Version added: 0.3.0

.. contents::
:local:
:depth: 1


Synopsis
--------
- Get information from checkly about Account.
- https://www.checklyhq.com/docs/api#tag/Account



Requirements
------------
The below requirements are needed on the host that executes this module.

- requests


Parameters
----------

.. raw:: html

<table border=0 cellpadding=0 class="documentation-table">
<tr>
<th colspan="1">Parameter</th>
<th>Choices/<font color="blue">Defaults</font></th>
<th width="100%">Comments</th>
</tr>
<tr>
<td colspan="1">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>api_key</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">string</span>
/ <span style="color: red">required</span>
</div>
</td>
<td>
</td>
<td>
<div>api key for checkly.</div>
</td>
</tr>
<tr>
<td colspan="1">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>url</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">string</span>
</div>
</td>
<td>
<b>Default:</b><br/><div style="color: blue">"https://api.checklyhq.com/v1/account"</div>
</td>
<td>
<div>checkly api.</div>
</td>
</tr>
</table>
<br/>




Examples
--------

.. code-block:: yaml
- name: get details about account
community.missing_collection.checkly_account_info:
api_key: 'sGxxxxxxxxxxxx6y'
Return Values
-------------
Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:

.. raw:: html

<table border=0 cellpadding=0 class="documentation-table">
<tr>
<th colspan="1">Key</th>
<th>Returned</th>
<th width="100%">Description</th>
</tr>
<tr>
<td colspan="1">
<div class="ansibleOptionAnchor" id="return-"></div>
<b>result</b>
<a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
<div style="font-size: small">
<span style="color: purple">dictionary</span>
</div>
</td>
<td>when success.</td>
<td>
<div>result of the api.</div>
<br/>
<div style="font-size: smaller"><b>Sample:</b></div>
<div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">{&#x27;accountId&#x27;: &#x27;string&#x27;, &#x27;name&#x27;: &#x27;string&#x27;}</div>
</td>
</tr>
</table>
<br/><br/>


Status
------


Authors
~~~~~~~

- Davinder Pal (@116davinder) <dpsangwal@gmail.com>
Original file line number Diff line number Diff line change
@@ -0,0 +1,184 @@
.. _community.missing_collection.checkly_alert_channels_info_module:


********************************************************
community.missing_collection.checkly_alert_channels_info
********************************************************

**Get information about checkly Alert Channels.**


Version added: 0.3.0

.. contents::
:local:
:depth: 1


Synopsis
--------
- Get information about checkly Alert Channels.
- https://www.checklyhq.com/docs/api#tag/Alert-channels



Requirements
------------
The below requirements are needed on the host that executes this module.

- requests


Parameters
----------

.. raw:: html

<table border=0 cellpadding=0 class="documentation-table">
<tr>
<th colspan="1">Parameter</th>
<th>Choices/<font color="blue">Defaults</font></th>
<th width="100%">Comments</th>
</tr>
<tr>
<td colspan="1">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>api_key</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">string</span>
/ <span style="color: red">required</span>
</div>
</td>
<td>
</td>
<td>
<div>api key for checkly.</div>
</td>
</tr>
<tr>
<td colspan="1">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>id</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">string</span>
</div>
</td>
<td>
</td>
<td>
<div>id of alert channel.</div>
</td>
</tr>
<tr>
<td colspan="1">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>limit</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">integer</span>
</div>
</td>
<td>
<b>Default:</b><br/><div style="color: blue">100</div>
</td>
<td>
<div>number of alert channels retrieved in one call.</div>
</td>
</tr>
<tr>
<td colspan="1">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>page</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">integer</span>
</div>
</td>
<td>
<b>Default:</b><br/><div style="color: blue">1</div>
</td>
<td>
<div>page number of alert channels retrieve call.</div>
</td>
</tr>
<tr>
<td colspan="1">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>url</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">string</span>
</div>
</td>
<td>
<b>Default:</b><br/><div style="color: blue">"https://api.checklyhq.com/v1/alert-channels/"</div>
</td>
<td>
<div>checkly alert channels api.</div>
</td>
</tr>
</table>
<br/>




Examples
--------

.. code-block:: yaml
- name: get all alert channels from checkly
community.missing_collection.checkly_alert_channels_info:
api_key: 'a8f08873c494445ba156e572e1324300'
- name: get one alert channel from checkly
community.missing_collection.checkly_alert_channels_info:
api_key: 'a8f08873c494445ba156e572e1324300'
id: 39308
Return Values
-------------
Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:

.. raw:: html

<table border=0 cellpadding=0 class="documentation-table">
<tr>
<th colspan="1">Key</th>
<th>Returned</th>
<th width="100%">Description</th>
</tr>
<tr>
<td colspan="1">
<div class="ansibleOptionAnchor" id="return-"></div>
<b>result</b>
<a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
<div style="font-size: small">
<span style="color: purple">list/dict</span>
</div>
</td>
<td>when success.</td>
<td>
<div>result of checkly api.</div>
<br/>
<div style="font-size: smaller"><b>Sample:</b></div>
<div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[{&#x27;id&#x27;: 0, &#x27;type&#x27;: &#x27;string&#x27;, &#x27;config&#x27;: {}, &#x27;subscriptions&#x27;: [], &#x27;sendRecovery&#x27;: True, &#x27;sendFailure&#x27;: True, &#x27;sendDegraded&#x27;: True, &#x27;sslExpiry&#x27;: False, &#x27;sslExpiryThreshold&#x27;: 30, &#x27;created_at&#x27;: &#x27;2019-08-24T14:15:22Z&#x27;, &#x27;updated_at&#x27;: &#x27;2019-08-24T14:15:22Z&#x27;}]</div>
</td>
</tr>
</table>
<br/><br/>


Status
------


Authors
~~~~~~~

- Davinder Pal (@116davinder) <dpsangwal@gmail.com>
Loading

0 comments on commit f2ab261

Please sign in to comment.