From dfbf9e515aa9a8906217bfd32c4eafdfb3cac609 Mon Sep 17 00:00:00 2001 From: L3D Date: Sun, 14 Jan 2024 22:23:13 +0100 Subject: [PATCH] install packages via scoop --- .gitignore | 3 ++- .gitmodules | 12 ++++++++++++ collections/ansible_collections/ansible/windows | 1 + collections/ansible_collections/chocolatey | 1 + .../ansible_collections/community/general | 1 + .../ansible_collections/community/windows | 1 + roles/win_gopass/tasks/main.yml | 8 ++++++++ roles/win_gopass/tasks/packages.yml | 17 +++++++++++++++++ roles/win_gopass/tasks/scoop.yml | 5 +++++ site.yml | 1 + 10 files changed, 49 insertions(+), 1 deletion(-) create mode 160000 collections/ansible_collections/ansible/windows create mode 160000 collections/ansible_collections/chocolatey create mode 160000 collections/ansible_collections/community/general create mode 160000 collections/ansible_collections/community/windows create mode 100644 roles/win_gopass/tasks/main.yml create mode 100644 roles/win_gopass/tasks/packages.yml create mode 100644 roles/win_gopass/tasks/scoop.yml diff --git a/.gitignore b/.gitignore index d29264d..599c60c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ # Venv -ansible/ +ansible/** + # ---> Vim # Swap [._]*.s[a-v][a-z] diff --git a/.gitmodules b/.gitmodules index 2b0c9e1..b7598b1 100644 --- a/.gitmodules +++ b/.gitmodules @@ -7,3 +7,15 @@ [submodule "roles/win_activating"] path = roles/win_activating url = https://git.l3d.ch/voc/win_ansible_role_activating.git +[submodule "collections/ansible_collections/ansible/windows"] + path = collections/ansible_collections/ansible/windows + url = https://github.com/ansible-collections/community.windows +[submodule "collections/ansible_collections/chocolatey"] + path = collections/ansible_collections/chocolatey + url = https://github.com/chocolatey/chocolatey-ansible.git +[submodule "collections/ansible_collections/community/windows"] + path = collections/ansible_collections/community/windows + url = https://github.com/ansible-collections/community.windows.git +[submodule "collections/ansible_collections/community/general"] + path = collections/ansible_collections/community/general + url = https://github.com/ansible-collections/community.general.git diff --git a/collections/ansible_collections/ansible/windows b/collections/ansible_collections/ansible/windows new file mode 160000 index 0000000..a03f6d2 --- /dev/null +++ b/collections/ansible_collections/ansible/windows @@ -0,0 +1 @@ +Subproject commit a03f6d23be11497282964e9dffbdffe78c9a28dd diff --git a/collections/ansible_collections/chocolatey b/collections/ansible_collections/chocolatey new file mode 160000 index 0000000..9bdc0d4 --- /dev/null +++ b/collections/ansible_collections/chocolatey @@ -0,0 +1 @@ +Subproject commit 9bdc0d40437a7dc7f0181af42da7e35bbcfcae4a diff --git a/collections/ansible_collections/community/general b/collections/ansible_collections/community/general new file mode 160000 index 0000000..32ec751 --- /dev/null +++ b/collections/ansible_collections/community/general @@ -0,0 +1 @@ +Subproject commit 32ec751996e1b0505cfef7c511c48d4d81edb091 diff --git a/collections/ansible_collections/community/windows b/collections/ansible_collections/community/windows new file mode 160000 index 0000000..a03f6d2 --- /dev/null +++ b/collections/ansible_collections/community/windows @@ -0,0 +1 @@ +Subproject commit a03f6d23be11497282964e9dffbdffe78c9a28dd diff --git a/roles/win_gopass/tasks/main.yml b/roles/win_gopass/tasks/main.yml new file mode 100644 index 0000000..81566f7 --- /dev/null +++ b/roles/win_gopass/tasks/main.yml @@ -0,0 +1,8 @@ +--- +- name: Install scoop + ansible.builtin.include_tasks: + file: scoop.yml + +- name: Install gopass and requirements using scoop + ansible.builtin.include_tasks: + file: packages.yml diff --git a/roles/win_gopass/tasks/packages.yml b/roles/win_gopass/tasks/packages.yml new file mode 100644 index 0000000..32fb5e3 --- /dev/null +++ b/roles/win_gopass/tasks/packages.yml @@ -0,0 +1,17 @@ +- name: Add some scoop buckets + community.windows.win_scoop_bucket: + name: '{{ item }}' + state: present + with_items: + - extras + - main + +- name: Install gopass and Requirements via scoop + community.windows.win_scoop: + state: present + name: '{{ item }}' + with_items: + - 'gpg4win' + - 'git' + - 'gopass' + - 'gopass-jsonapi' diff --git a/roles/win_gopass/tasks/scoop.yml b/roles/win_gopass/tasks/scoop.yml new file mode 100644 index 0000000..bda18cc --- /dev/null +++ b/roles/win_gopass/tasks/scoop.yml @@ -0,0 +1,5 @@ +- name: install scoop + ansible.windows.win_powershell: + script: | + Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser + iex "& {$(irm get.scoop.sh)} -RunAsAdmin" diff --git a/site.yml b/site.yml index 98a32f7..edb5ce5 100644 --- a/site.yml +++ b/site.yml @@ -10,3 +10,4 @@ roles: - {role: win_activating, tags: zeroconf} - {role: win_zeroconf, tags: zeroconf} + - {role: win_gopass, tags: gopass}