Created
January 1, 2020 11:24
-
-
Save robbytaylor/91b42338da5dd295ca06b1effcfeaf6b to your computer and use it in GitHub Desktop.
Ansible playbook to install and authenticate the 1Password CLI tool
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- 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