Forum Discussion

Former Member's avatar
Former Member
3 years ago

Can`t get items in ansible playbook

Hello!
I have issue with getting variables from items in ansible playbook. I tried it on Ubuntu and MacOS.
op version is 2.19.0.
ansible version is 2.12.10

  1. Sign in to 1Password by CLI
    eval $(op signin)
    (test by `op vault list' is pass)

  2. Execute ansible playbook
    ```

  3. name: Get Password
    hosts: localhost
    gather_facts: no
    tasks:

    • ansible.builtin.debug: msg: "{{ lookup('community.general.onepassword', 'test_1', vault='my_vault', field='password') }}" ```
  4. Get error
    fatal: [localhost]: FAILED! => {"msg": "Unable to sign in to 1Password. master_password is required."}

What am I doing wrong?


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

1 Reply

  • Former Member's avatar
    Former Member

    It looks like your ansible version is too old - you need at least the community.general collection at least https://github.com/ansible-collections/community.general/blob/stable-6/CHANGELOG.rst#v600