joltcan.op.connect (1.0.6) — lookup

retreive information from vault(s) in 1Password via 1Password connect

| "added in version" 1.0 of joltcan.op"

Authors: Fredrik Lundhag (@joltcan)

Install collection

Install with ansible-galaxy collection install joltcan.op:==1.0.6


Add to requirements.yml

  collections:
    - name: joltcan.op
      version: 1.0.6

Description

Retreive information from vaults in 1Password via 1Password Connect (opconnect). An opconnect instance is needed, see https://github.com/1Password/connect

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
---
- hosts: 127.0.0.1
  tasks:
    - set_fact: foo_password="{{ lookup('opconnect', 'item', vault='OPS', section='creds', field='api_key') }}"
    - debug: msg="var is {{ foo_password }} "
    - debug: msg="{{ lookup('opconnect', 'item', vault='OPS') }}" # will return the password value of the item.

Inputs

    
field:
    description: field to search for. Needed when section is used
    required: false

vault:
    description: Name of the vault that the item resides in.
    required: true

_terms:
    description: Vault item too look for
    required: true

section:
    description: Item section, can be used with field below.
    required: false

op_connect_host:
    description: REST API endpoint for 1Password Connect
    env:
    - name: OP_CONNECT_HOST
    ini:
    - key: op_connect_host
      section: op_connect
    required: true
    type: string

op_connect_token:
    description: API token for 1Password Connect access
    env:
    - name: OP_CONNECT_TOKEN
    ini:
    - key: op_connect_token
      section: op_connect
    required: true
    type: string

op_connect_ca_bundle:
    description: Custom CA bundle for self signed certificates
    env:
    - name: OP_CONNECT_CA_BUNDLE
    ini:
    - key: op_connect_ca_bundle
      section: op_connect
    required: false
    type: boolean

op_connect_skip_verify:
    description: Skip TLS host verification
    env:
    - name: OP_CONNECT_SKIP_VERIFY
    ini:
    - key: op_connect_skip_verify
      section: op_connect
    required: false
    type: boolean

Outputs

_list:
  description: 1Password item value