community.general.shelvefile (3.8.10) — lookup

read keys from Python shelve file

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

Install collection

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


Add to requirements.yml

  collections:
    - name: community.general
      version: 3.8.10

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