Skip to content

Docker CD env lookup #95

Closed
Closed
@Mafyuh

Description

@Mafyuh

something is broke, can exec into mafyuh/ansible-bws:v1.1.1 and run

ansible-playbook -i ansible/hosts.ini ./ansible/playbooks/deploy-docker.yml --extra-vars "target_host=${{ env.target_host }} folder=${{ env.folder }} bw_access_token=${{ secrets.BW_ACCESS_TOKEN }}"

no issues, but Actions wants to return

 FAILED! => {"msg": "lookup plugin (bitwarden.secrets.lookup) not found"}

shows as plugin inside of CT

ansible-doc -t lookup -l | grep bitwarden
[WARNING]: While constructing a mapping from /usr/lib/python3/dist-
packages/ansible_collections/wti/remote/plugins/lookup/cpm_snmp_config.py, line
58, column 9, found a duplicate dict key (type). Using last defined value only.
bitwarden.secrets.lookup                          Lookup secrets from Bitwa...
community.general.bitwarden                       Retrieve secrets from Bit...
community.general.bitwarden_secrets_manager       Retrieve secrets from Bit...

installed in CT with

RUN ansible-galaxy collection install \
    bitwarden.secrets \
    community.docker \
    community.general

along with the BWS SDK & CLI


Remove ignore_errors: true from Write .env file to target host step in playbook once fixed. Will just have to manually update these variables in the time being

Docker CD
Playbook
Dockerfile


Ansible BWS Docs

Might be smart to switch to community.bitwarden
https://docs.ansible.com/ansible/latest/collections/community/general/bitwarden_secrets_manager_lookup.html

Might be able to take a different approach and just use BWS CLI

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

Status

Done

Milestone

No milestone

Relationships

Development

No branches or pull requests

    Participants

    @Mafyuh

    Issue actions

      Docker CD env lookup · Issue #95 · Mafyuh/iac