Getting started with 1Password for your growing team, or refining your setup? Our Secured Success quickstart guide is for you.
Forum Discussion
balajidutt
2 years agoNew Contributor
CLI command fails when run with Ansible playbook
Hello,
I'm struggling to try and get an Ansible playbook that updates a Password in my 1Password vault. Here is the simplified playbook:
```
- name: Configuration of the Bootstrap server
...
balajidutt
2 years agoNew Contributor
I pinged this thread to the 1Password Support account on X/Twitter who suggested I raise a Support ticket.
I got a suggestion on how to fix this, which required some fiddling with the syntax but in the end the following ansible step works as expected:
shell
- name: Update the 1Password Vault entry using the JSON file for login via UI
ansible.builtin.shell:
args:
cmd: "cat {{ onepass_file }} | /usr/bin/op item edit \"{{ onepass_item }}\""
executable: /bin/bash
delegate_to: localhost
Yes you can gnash your teeth about the UUOC here but hey it works and this is code for my homelab, and working code is all I need :-)