From 667771093d4497f136038cf7f50432b443510fcf Mon Sep 17 00:00:00 2001 From: "opencode-agent[bot]" Date: Tue, 2 Jun 2026 22:33:05 +0000 Subject: [PATCH 1/6] Added Ansible snap install task Co-authored-by: kenorb --- .ansible/playbooks/setup-linux.yml | 6 ++++++ .ansible/playbooks/tasks/snap-install.yml | 5 +++++ .ansible/variables-example.yml | 4 ++++ requirements.yml | 3 +++ 4 files changed, 18 insertions(+) create mode 100644 .ansible/playbooks/tasks/snap-install.yml create mode 100644 requirements.yml diff --git a/.ansible/playbooks/setup-linux.yml b/.ansible/playbooks/setup-linux.yml index 8d08631..80ae453 100644 --- a/.ansible/playbooks/setup-linux.yml +++ b/.ansible/playbooks/setup-linux.yml @@ -65,3 +65,9 @@ ansible.builtin.import_tasks: tasks/deno.yml when: deno | default(false) | bool tags: [deno, install] + + - name: Import snap install tasks + ansible.builtin.import_tasks: tasks/snap-install.yml + when: snap.install is defined and (snap.install | length > 0) + become: true + tags: [snap, install] diff --git a/.ansible/playbooks/tasks/snap-install.yml b/.ansible/playbooks/tasks/snap-install.yml new file mode 100644 index 0000000..d3adbda --- /dev/null +++ b/.ansible/playbooks/tasks/snap-install.yml @@ -0,0 +1,5 @@ +--- +- name: Install snap packages from variables.yml list + community.general.snap: + name: '{{ snap.install }}' + state: present diff --git a/.ansible/variables-example.yml b/.ansible/variables-example.yml index 434f2f2..22e2a68 100644 --- a/.ansible/variables-example.yml +++ b/.ansible/variables-example.yml @@ -147,3 +147,7 @@ eget_packages: nvidia: cuda_toolkit: true cuda_toolkit_package: cuda-toolkit-13-1 + +snap: + install: + - telegram-desktop diff --git a/requirements.yml b/requirements.yml new file mode 100644 index 0000000..afc836d --- /dev/null +++ b/requirements.yml @@ -0,0 +1,3 @@ +--- +collections: + - name: community.general From 161b18ad8b55f0f5dd01e0447c192d612a31daf3 Mon Sep 17 00:00:00 2001 From: "opencode-agent[bot]" Date: Tue, 2 Jun 2026 22:39:45 +0000 Subject: [PATCH 2/6] Move requirements.yml to .ansible/ and harden Ansible task guards --- .ansible/playbooks/setup-linux.yml | 18 +++++++++--------- requirements.yml => .ansible/requirements.yml | 0 2 files changed, 9 insertions(+), 9 deletions(-) rename requirements.yml => .ansible/requirements.yml (100%) diff --git a/.ansible/playbooks/setup-linux.yml b/.ansible/playbooks/setup-linux.yml index 80ae453..0f8d9c7 100644 --- a/.ansible/playbooks/setup-linux.yml +++ b/.ansible/playbooks/setup-linux.yml @@ -17,43 +17,43 @@ tasks: - name: Import apt upgrade tasks ansible.builtin.import_tasks: tasks/apt-upgrade.yml - when: apt.upgrade | default(true) | bool + when: apt is defined and (apt.upgrade | default(true) | bool) become: true tags: [apt, upgrade] - name: Import apt install tasks ansible.builtin.import_tasks: tasks/apt-install.yml - when: apt.install is defined and (apt.install | length > 0) + when: apt is defined and apt.install is defined and (apt.install | length > 0) become: true tags: [apt, install] - name: Import CUDA Toolkit installation tasks ansible.builtin.import_tasks: tasks/cuda-toolkit.yml - when: nvidia.cuda_toolkit | default(false) | bool + when: nvidia is defined and (nvidia.cuda_toolkit | default(false) | bool) become: true tags: [nvidia, cuda] - name: Import VS Code installation tasks ansible.builtin.import_tasks: tasks/apt-release-code.yml - when: (apt.releases.code | default(false)) if apt.releases is defined else false + when: apt is defined and apt.releases is defined and (apt.releases.code | default(false)) become: true tags: [apt, code, vscode] - name: Import Brave installation tasks ansible.builtin.import_tasks: tasks/apt-release-brave.yml - when: (apt.releases.brave | default(false)) if apt.releases is defined else false + when: apt is defined and apt.releases is defined and (apt.releases.brave | default(false)) become: true tags: [apt, brave] - name: Import Proton VPN installation tasks ansible.builtin.import_tasks: tasks/apt-release-protonvpn.yml - when: (apt.releases.protonvpn | default(false)) if apt.releases is defined else false + when: apt is defined and apt.releases is defined and (apt.releases.protonvpn | default(false)) become: true tags: [apt, protonvpn, vpn] - name: Import eget installation tasks ansible.builtin.import_tasks: tasks/eget.yml - when: eget | default(false) | bool + when: eget is defined and (eget | default(false) | bool) tags: [eget, upgrade, install] - name: Import dotfiles symlink tasks @@ -63,11 +63,11 @@ - name: Import deno installation tasks ansible.builtin.import_tasks: tasks/deno.yml - when: deno | default(false) | bool + when: deno is defined and (deno | default(false) | bool) tags: [deno, install] - name: Import snap install tasks ansible.builtin.import_tasks: tasks/snap-install.yml - when: snap.install is defined and (snap.install | length > 0) + when: snap is defined and snap.install is defined and (snap.install | length > 0) become: true tags: [snap, install] diff --git a/requirements.yml b/.ansible/requirements.yml similarity index 100% rename from requirements.yml rename to .ansible/requirements.yml From f1b7835086e59da600e80baf05d6cd44babdf909 Mon Sep 17 00:00:00 2001 From: "Rafal W." Date: Wed, 3 Jun 2026 00:05:24 +0100 Subject: [PATCH 3/6] Add sublime-text to snap install list --- .ansible/variables-example.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.ansible/variables-example.yml b/.ansible/variables-example.yml index 22e2a68..4561698 100644 --- a/.ansible/variables-example.yml +++ b/.ansible/variables-example.yml @@ -150,4 +150,5 @@ nvidia: snap: install: + - sublime-text - telegram-desktop From 015c592ba31c09038b5fc864f6aa30fcf81d9d08 Mon Sep 17 00:00:00 2001 From: kenorb Date: Wed, 3 Jun 2026 00:10:45 +0100 Subject: [PATCH 4/6] Update snap installation tasks and example variables for sublime-text --- .ansible/README.md | 1 + .ansible/playbooks/tasks/snap-install.yml | 7 +++++-- .ansible/variables-example.yml | 3 ++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.ansible/README.md b/.ansible/README.md index b4b87b7..90af31f 100644 --- a/.ansible/README.md +++ b/.ansible/README.md @@ -20,6 +20,7 @@ Run the setup playbook: ```bash pipenv sync +pipenv run ansible-galaxy install -r requirements.yml pipenv run ansible-playbook -i inventory/hosts playbooks/setup-linux.yml -K ``` diff --git a/.ansible/playbooks/tasks/snap-install.yml b/.ansible/playbooks/tasks/snap-install.yml index d3adbda..6d04295 100644 --- a/.ansible/playbooks/tasks/snap-install.yml +++ b/.ansible/playbooks/tasks/snap-install.yml @@ -1,5 +1,8 @@ --- -- name: Install snap packages from variables.yml list +- name: Install snap packages community.general.snap: - name: '{{ snap.install }}' + name: '{{ item.name | default(item) }}' + classic: '{{ item.classic | default(omit) }}' state: present + loop: '{{ snap.install }}' + when: snap.install is defined diff --git a/.ansible/variables-example.yml b/.ansible/variables-example.yml index 4561698..72ab0a3 100644 --- a/.ansible/variables-example.yml +++ b/.ansible/variables-example.yml @@ -150,5 +150,6 @@ nvidia: snap: install: - - sublime-text + - name: sublime-text + classic: true - telegram-desktop From 54accb66b1f8f901bab968fb47218b496fa1eb9f Mon Sep 17 00:00:00 2001 From: kenorb Date: Wed, 3 Jun 2026 00:17:59 +0100 Subject: [PATCH 5/6] Add .ansible-lint configuration file with project directory setting --- .ansible-lint | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .ansible-lint diff --git a/.ansible-lint b/.ansible-lint new file mode 100644 index 0000000..0aa2fa0 --- /dev/null +++ b/.ansible-lint @@ -0,0 +1,2 @@ +--- +project_dir: .ansible From 4aa56e6e98171c74eca49dabf35a0c55a1728fcd Mon Sep 17 00:00:00 2001 From: "Rafal W." Date: Thu, 4 Jun 2026 16:49:55 +0100 Subject: [PATCH 6/6] Add aws-cli to snap installation list --- .ansible/variables-example.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.ansible/variables-example.yml b/.ansible/variables-example.yml index 72ab0a3..b38d142 100644 --- a/.ansible/variables-example.yml +++ b/.ansible/variables-example.yml @@ -150,6 +150,8 @@ nvidia: snap: install: + - name: aws-cli + classic: true - name: sublime-text classic: true - - telegram-desktop + - name: telegram-desktop