Skip to content

Instantly share code, notes, and snippets.

@robbytaylor
Created January 1, 2020 11:24
Show Gist options
  • Save robbytaylor/91b42338da5dd295ca06b1effcfeaf6b to your computer and use it in GitHub Desktop.
Save robbytaylor/91b42338da5dd295ca06b1effcfeaf6b to your computer and use it in GitHub Desktop.
Ansible playbook to install and authenticate the 1Password CLI tool
---
- name: Unarchive 1Password CLI tool
unarchive:
src: 'https://cache.agilebits.com/dist/1P/op/pkg/v{{ op.version }}/op_linux_amd64_v{{ op.version }}.zip'
remote_src: yes
dest: /tmp
- name: Copy 1Password CLI tool into place
copy:
src: /tmp/op
dest: /usr/local/bin/op
mode: 0755
owner: root
group: root
- name: Update 1Password CLI tool
command: op update
- name: 1Password Login
become: no
expect:
command: 'op signin {{ op.address }} {{ op.email }} {{ op_secret }}'
responses:
(?i)password: '{{ op_pass }}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment