Skip to content

Commit

Permalink
Bugfix: Remove secrets from lookup plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
FragmentedPacket authored Mar 8, 2021
2 parents f410d80 + 2802b52 commit eab1a69
Show file tree
Hide file tree
Showing 62 changed files with 73 additions and 119 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ env:
global:
- COLLECTION_NAMESPACE: "networktocode"
- COLLECTION_NAME: "nautobot"
- COLLECTION_VERSION: "1.0.1"
- COLLECTION_VERSION: "1.0.2"

jobs:
include:
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ networktocode.nautobot Release Notes
.. contents:: Topics


v1.0.2
======

Bugfixes
--------

- Remove code related to fetching secrets due to secrets not existing in Nautobot.

v1.0.1
======

Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/aggregate_module.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ networktocode.nautobot.aggregate -- Creates or removes aggregates from Nautobot
.. Collection note
.. note::
This plugin is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 1.0.0).
This plugin is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 1.0.2).

To install it use: :code:`ansible-galaxy collection install networktocode.nautobot`.

Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/cable_module.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ networktocode.nautobot.cable -- Create, update or delete cables within Nautobot
.. Collection note
.. note::
This plugin is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 1.0.0).
This plugin is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 1.0.2).

To install it use: :code:`ansible-galaxy collection install networktocode.nautobot`.

Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/circuit_module.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ networktocode.nautobot.circuit -- Create, update or delete circuits within Nauto
.. Collection note
.. note::
This plugin is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 1.0.0).
This plugin is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 1.0.2).

To install it use: :code:`ansible-galaxy collection install networktocode.nautobot`.

Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/circuit_termination_module.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ networktocode.nautobot.circuit_termination -- Create, update or delete circuit t
.. Collection note
.. note::
This plugin is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 1.0.0).
This plugin is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 1.0.2).

To install it use: :code:`ansible-galaxy collection install networktocode.nautobot`.

Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/circuit_type_module.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ networktocode.nautobot.circuit_type -- Create, update or delete circuit types wi
.. Collection note
.. note::
This plugin is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 1.0.0).
This plugin is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 1.0.2).

To install it use: :code:`ansible-galaxy collection install networktocode.nautobot`.

Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/cluster_group_module.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ networktocode.nautobot.cluster_group -- Create, update or delete cluster groups
.. Collection note
.. note::
This plugin is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 1.0.0).
This plugin is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 1.0.2).

To install it use: :code:`ansible-galaxy collection install networktocode.nautobot`.

Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/cluster_module.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ networktocode.nautobot.cluster -- Create, update or delete clusters within Nauto
.. Collection note
.. note::
This plugin is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 1.0.0).
This plugin is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 1.0.2).

To install it use: :code:`ansible-galaxy collection install networktocode.nautobot`.

Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/cluster_type_module.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ networktocode.nautobot.cluster_type -- Create, update or delete cluster types wi
.. Collection note
.. note::
This plugin is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 1.0.0).
This plugin is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 1.0.2).

To install it use: :code:`ansible-galaxy collection install networktocode.nautobot`.

Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/console_port_module.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ networktocode.nautobot.console_port -- Create, update or delete console ports wi
.. Collection note
.. note::
This plugin is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 1.0.0).
This plugin is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 1.0.2).

To install it use: :code:`ansible-galaxy collection install networktocode.nautobot`.

Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/console_port_template_module.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ networktocode.nautobot.console_port_template -- Create, update or delete console
.. Collection note
.. note::
This plugin is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 1.0.0).
This plugin is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 1.0.2).

To install it use: :code:`ansible-galaxy collection install networktocode.nautobot`.

Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/console_server_port_module.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ networktocode.nautobot.console_server_port -- Create, update or delete console s
.. Collection note
.. note::
This plugin is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 1.0.0).
This plugin is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 1.0.2).

To install it use: :code:`ansible-galaxy collection install networktocode.nautobot`.

Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/console_server_port_template_module.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ networktocode.nautobot.console_server_port_template -- Create, update or delete
.. Collection note
.. note::
This plugin is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 1.0.0).
This plugin is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 1.0.2).

To install it use: :code:`ansible-galaxy collection install networktocode.nautobot`.

Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/device_bay_module.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ networktocode.nautobot.device_bay -- Create, update or delete device bays within
.. Collection note
.. note::
This plugin is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 1.0.0).
This plugin is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 1.0.2).

To install it use: :code:`ansible-galaxy collection install networktocode.nautobot`.

Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/device_bay_template_module.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ networktocode.nautobot.device_bay_template -- Create, update or delete device ba
.. Collection note
.. note::
This plugin is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 1.0.0).
This plugin is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 1.0.2).

To install it use: :code:`ansible-galaxy collection install networktocode.nautobot`.

Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/device_interface_module.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ networktocode.nautobot.device_interface -- Creates or removes interfaces on devi
.. Collection note
.. note::
This plugin is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 1.0.0).
This plugin is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 1.0.2).

To install it use: :code:`ansible-galaxy collection install networktocode.nautobot`.

Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/device_interface_template_module.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ networktocode.nautobot.device_interface_template -- Creates or removes interface
.. Collection note
.. note::
This plugin is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 1.0.0).
This plugin is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 1.0.2).

To install it use: :code:`ansible-galaxy collection install networktocode.nautobot`.

Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/device_module.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ networktocode.nautobot.device -- Create, update or delete devices within Nautobo
.. Collection note
.. note::
This plugin is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 1.0.0).
This plugin is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 1.0.2).

To install it use: :code:`ansible-galaxy collection install networktocode.nautobot`.

Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/device_role_module.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ networktocode.nautobot.device_role -- Create, update or delete devices roles wit
.. Collection note
.. note::
This plugin is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 1.0.0).
This plugin is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 1.0.2).

To install it use: :code:`ansible-galaxy collection install networktocode.nautobot`.

Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/device_type_module.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ networktocode.nautobot.device_type -- Create, update or delete device types with
.. Collection note
.. note::
This plugin is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 1.0.0).
This plugin is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 1.0.2).

To install it use: :code:`ansible-galaxy collection install networktocode.nautobot`.

Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/front_port_module.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ networktocode.nautobot.front_port -- Create, update or delete front ports within
.. Collection note
.. note::
This plugin is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 1.0.0).
This plugin is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 1.0.2).

To install it use: :code:`ansible-galaxy collection install networktocode.nautobot`.

Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/front_port_template_module.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ networktocode.nautobot.front_port_template -- Create, update or delete front por
.. Collection note
.. note::
This plugin is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 1.0.0).
This plugin is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 1.0.2).

To install it use: :code:`ansible-galaxy collection install networktocode.nautobot`.

Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Networktocode.Nautobot
======================

Collection version 1.0.0
Collection version 1.0.2

.. toctree::
:maxdepth: 1
Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/inventory_inventory.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ networktocode.nautobot.inventory -- Nautobot inventory source
.. Collection note
.. note::
This plugin is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 1.0.0).
This plugin is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 1.0.2).

To install it use: :code:`ansible-galaxy collection install networktocode.nautobot`.

Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/inventory_item_module.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ networktocode.nautobot.inventory_item -- Creates or removes inventory items from
.. Collection note
.. note::
This plugin is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 1.0.0).
This plugin is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 1.0.2).

To install it use: :code:`ansible-galaxy collection install networktocode.nautobot`.

Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/ip_address_module.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ networktocode.nautobot.ip_address -- Creates or removes IP addresses from Nautob
.. Collection note
.. note::
This plugin is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 1.0.0).
This plugin is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 1.0.2).

To install it use: :code:`ansible-galaxy collection install networktocode.nautobot`.

Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/ipam_role_module.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ networktocode.nautobot.ipam_role -- Creates or removes ipam roles from Nautobot
.. Collection note
.. note::
This plugin is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 1.0.0).
This plugin is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 1.0.2).

To install it use: :code:`ansible-galaxy collection install networktocode.nautobot`.

Expand Down
29 changes: 1 addition & 28 deletions docs/plugins/lookup_lookup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ networktocode.nautobot.lookup -- Queries and returns elements from Nautobot
.. Collection note
.. note::
This plugin is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 1.0.0).
This plugin is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 1.0.2).

To install it use: :code:`ansible-galaxy collection install networktocode.nautobot`.

Expand All @@ -43,7 +43,6 @@ Synopsis
.. Description
- Queries Nautobot via its API to return virtually any information capable of being held in Nautobot.
- If wanting to obtain the plaintext attribute of a secret, key_file must be provided.


.. Aliases
Expand Down Expand Up @@ -128,23 +127,6 @@ Parameters
<td>
<div>The api_filter to use.</div>
</td>
</tr>
<tr>
<td colspan="1">
<div class="ansibleOptionAnchor" id="parameter-key_file"></div>
<b>key_file</b>
<a class="ansibleOptionLink" href="#parameter-key_file" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">string</span>
</div>
</td>
<td>
</td>
<td>
</td>
<td>
<div>The location of the private key tied to user account.</div>
</td>
</tr>
<tr>
<td colspan="1">
Expand Down Expand Up @@ -251,7 +233,6 @@ Examples
token='<redacted>') }}"

# This example uses an API Filter

tasks:
# query a list of devices
- name: Obtain list of devices from Nautobot
Expand All @@ -264,12 +245,6 @@ Examples
api_filter='role=management tag=Dell'),
token='<redacted>') }}"

# Obtain a secret for R1-device
tasks:
- name: "Obtain secrets for R1-Device"
debug:
msg: "{{ query('networktocode.nautobot.lookup', 'secrets', api_filter='device=R1-Device', api_endpoint='http://localhost/', token='<redacted>', key_file='~/.ssh/id_rsa') }}"

# Fetch bgp sessions for R1-device
tasks:
- name: "Obtain bgp sessions for R1-Device"
Expand All @@ -280,8 +255,6 @@ Examples
token='<redacted>',
plugin='mycustomstuff') }}"

msg: "{{ query('networktocode.nautobot.lookup', 'secrets', api_filter='device=R1-Device', api_endpoint='http://localhost/', token='<redacted>', key_file='~/.ssh/id_rsa') }}"




Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/manufacturer_module.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ networktocode.nautobot.manufacturer -- Create or delete manufacturers within Nau
.. Collection note
.. note::
This plugin is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 1.0.0).
This plugin is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 1.0.2).

To install it use: :code:`ansible-galaxy collection install networktocode.nautobot`.

Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/platform_module.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ networktocode.nautobot.platform -- Create or delete platforms within Nautobot
.. Collection note
.. note::
This plugin is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 1.0.0).
This plugin is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 1.0.2).

To install it use: :code:`ansible-galaxy collection install networktocode.nautobot`.

Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/power_feed_module.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ networktocode.nautobot.power_feed -- Create, update or delete power feeds within
.. Collection note
.. note::
This plugin is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 1.0.0).
This plugin is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 1.0.2).

To install it use: :code:`ansible-galaxy collection install networktocode.nautobot`.

Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/power_outlet_module.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ networktocode.nautobot.power_outlet -- Create, update or delete power outlets wi
.. Collection note
.. note::
This plugin is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 1.0.0).
This plugin is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 1.0.2).

To install it use: :code:`ansible-galaxy collection install networktocode.nautobot`.

Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/power_outlet_template_module.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ networktocode.nautobot.power_outlet_template -- Create, update or delete power o
.. Collection note
.. note::
This plugin is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 1.0.0).
This plugin is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 1.0.2).

To install it use: :code:`ansible-galaxy collection install networktocode.nautobot`.

Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/power_panel_module.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ networktocode.nautobot.power_panel -- Create, update or delete power panels with
.. Collection note
.. note::
This plugin is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 1.0.0).
This plugin is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 1.0.2).

To install it use: :code:`ansible-galaxy collection install networktocode.nautobot`.

Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/power_port_module.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ networktocode.nautobot.power_port -- Create, update or delete power ports within
.. Collection note
.. note::
This plugin is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 1.0.0).
This plugin is part of the `networktocode.nautobot collection <https://galaxy.ansible.com/networktocode/nautobot>`_ (version 1.0.2).

To install it use: :code:`ansible-galaxy collection install networktocode.nautobot`.

Expand Down
Loading

0 comments on commit eab1a69

Please sign in to comment.