--- - name: set keyring path set_fact: keyring: /etc/apt/keyrings/1password.asc old_keyring: /etc/apt/trusted.gpg.d/1password-archive-keyring.gpg - name: remove old keyring become: true file: path: '{{old_keyring}}' state: absent - name: add apt signing key when: '"WSL" not in ansible_kernel' become: true get_url: url: https://downloads.1password.com/linux/keys/1password.asc dest: '{{keyring}}' - name: set compatible architecture when: ansible_machine == 'x86_64' set_fact: arch: amd64 - assert: that: arch is defined fail_msg: 'Architecture not currently supported: {{ansible_machine}}' - name: add apt repository when: '"WSL" not in ansible_kernel' become: true copy: content: >- deb [arch={{arch}} signed-by={{keyring}}] https://downloads.1password.com/linux/debian/{{arch}} stable main dest: /etc/apt/sources.list.d/1password.list - name: install gui package when: '"WSL" not in ansible_kernel' become: true apt: name: 1password state: latest - name: install cli package when: '"WSL" not in ansible_kernel' become: true apt: name: 1password-cli state: latest - name: create symlink to op.exe when: '"WSL" in ansible_kernel' file: state: link src: /mnt/c/Users/Benie/AppData/Local/1Password/cli/op.exe dest: ~/.local/bin/op - include_tasks: zsh-completion.yaml