From 3652b3c9cbd22b3c18d1e69296b62c13e11fe783 Mon Sep 17 00:00:00 2001 From: "Kenneth Benzie (Benie)" Date: Sun, 1 May 2022 22:01:14 +0100 Subject: [PATCH] Add 1password role for macOS and Windows --- main.yaml | 1 + roles/1password/tasks/Darwin.yaml | 5 +++++ roles/1password/tasks/Debian.yaml | 1 + roles/1password/tasks/Windows.yaml | 12 ++++++++++++ roles/1password/tasks/main.yaml | 2 ++ 5 files changed, 21 insertions(+) create mode 100644 roles/1password/tasks/Darwin.yaml create mode 100644 roles/1password/tasks/Debian.yaml create mode 100644 roles/1password/tasks/Windows.yaml create mode 100644 roles/1password/tasks/main.yaml diff --git a/main.yaml b/main.yaml index 02fc203..0855457 100644 --- a/main.yaml +++ b/main.yaml @@ -17,3 +17,4 @@ - role: git - role: python - role: autohotkey + - role: 1password diff --git a/roles/1password/tasks/Darwin.yaml b/roles/1password/tasks/Darwin.yaml new file mode 100644 index 0000000..f659c20 --- /dev/null +++ b/roles/1password/tasks/Darwin.yaml @@ -0,0 +1,5 @@ +--- +- name: install homebrew package + homebrew_cask: + name: 1password + state: latest diff --git a/roles/1password/tasks/Debian.yaml b/roles/1password/tasks/Debian.yaml new file mode 100644 index 0000000..d4f6695 --- /dev/null +++ b/roles/1password/tasks/Debian.yaml @@ -0,0 +1 @@ +# TODO: https://support.1password.com/install-linux/#debian-or-ubuntu diff --git a/roles/1password/tasks/Windows.yaml b/roles/1password/tasks/Windows.yaml new file mode 100644 index 0000000..f3bf586 --- /dev/null +++ b/roles/1password/tasks/Windows.yaml @@ -0,0 +1,12 @@ +--- +- name: install chocolatey package + win_chocolatey: + name: + - 1password + state: latest + +- name: create start menu shortcut + win_shortcut: + src: '{{ansible_env.LOCALAPPDATA}}/1Password/app/7/1Password.exe' + dest: '{{ansible_env.ProgramData}}/Microsoft/Windows/Start Menu/Programs/1Password.lnk' + icon: '{{ansible_env.LOCALAPPDATA}}/1Password/app/7/1Password.exe,0' diff --git a/roles/1password/tasks/main.yaml b/roles/1password/tasks/main.yaml new file mode 100644 index 0000000..6853678 --- /dev/null +++ b/roles/1password/tasks/main.yaml @@ -0,0 +1,2 @@ +--- +- include_tasks: '{{ansible_os_family}}.yaml'