community.general.shelvefile (8.5.0) — lookup

read keys from Python shelve file

Authors: Alejandro Guirao (!UNKNOWN) <lekumberri@gmail.com>

Install collection

Install with ansible-galaxy collection install community.general:==8.5.0


Add to requirements.yml

  collections:
    - name: community.general
      version: 8.5.0

Description

Read keys from Python shelve file.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Retrieve a string value corresponding to a key inside a Python shelve file
  ansible.builtin.debug:
    msg: "{{ lookup('community.general.shelvefile', 'file=path_to_some_shelve_file.db key=key_to_retrieve') }}"

Inputs

    
key:
    description: Key to query.
    required: true

file:
    description: Path to shelve file.
    required: true

_terms:
    description: Sets of key value pairs of parameters.

Outputs

_list:
  description: Value(s) of key(s) in shelve file(s).
  elements: str
  type: list