Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .ansible-lint
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
project_dir: .ansible
1 change: 1 addition & 0 deletions .ansible/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

Expand Down
22 changes: 14 additions & 8 deletions .ansible/playbooks/setup-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -63,5 +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 is defined and snap.install is defined and (snap.install | length > 0)
become: true
tags: [snap, install]
8 changes: 8 additions & 0 deletions .ansible/playbooks/tasks/snap-install.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
- name: Install snap packages

Check failure on line 2 in .ansible/playbooks/tasks/snap-install.yml

View workflow job for this annotation

GitHub Actions / check / Pre-commit

syntax-check[unknown-module]

couldn't resolve module/action 'community.general.snap'. This often indicates a misspelling, missing collection, or incorrect module path.

Check failure on line 2 in .ansible/playbooks/tasks/snap-install.yml

View workflow job for this annotation

GitHub Actions / check / Pre-commit

syntax-check[unknown-module]

couldn't resolve module/action 'community.general.snap'. This often indicates a misspelling, missing collection, or incorrect module path.
community.general.snap:
name: '{{ item.name | default(item) }}'
classic: '{{ item.classic | default(omit) }}'
state: present
loop: '{{ snap.install }}'
when: snap.install is defined
3 changes: 3 additions & 0 deletions .ansible/requirements.yml
Comment thread
kenorb marked this conversation as resolved.
Comment thread
kenorb marked this conversation as resolved.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
collections:
- name: community.general
8 changes: 8 additions & 0 deletions .ansible/variables-example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -147,3 +147,11 @@ eget_packages:
nvidia:
cuda_toolkit: true
cuda_toolkit_package: cuda-toolkit-13-1

snap:
install:
- name: aws-cli
classic: true
- name: sublime-text
classic: true
- name: telegram-desktop
Loading