1Password on Mastodon

Pull out whole item/file via Ansible from vault

Is there possiblity to pull whole item as a file out from vault via Ansible integration?


Is there any examples how to do it?


1Password Version: Not Provided
Extension Version: Not Provided
OS Version: Not Provided


  • Joris_1PJoris_1P

    Team Member
    edited February 2022

    Hi @frankvisma,

    My apologies for the late response. I am not an Ansible expert, but I'd expect something like this to work:

      hosts: localhost
        OP_CONNECT_HOST: http://localhost:8001
        OP_CONNECT_TOKEN: "valid.jwt.here"
        - onepassword.connect
        - name: Find the item with the label "Staging Database" in the vault "Staging Env"
            item: Staging Database
            vault: Staging Env
          no_log: true
          register: op_item
        - local_action: copy content={{ op_item }} dest=/path/to/destination/file

    You can see the contents of {{ op_item }} in the collapses section in this part of the docs.

    Let me know if that works for you.

  • frankvismafrankvisma
    Community Member


    That is not unfortunately what Im after. They made issue out of it: https://github.com/1Password/ansible-onepasswordconnect-collection/issues/53

This discussion has been closed.