Skip to content
Merged
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
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Run the `setup` playbook:
```bash
cd ~/.local/share/linux-setup-playbook

./run.sh main.yml
./run.sh playbooks/default.yml
```

The [run.sh](run.sh) script is a tiny wrapper for the `ansible-playbook` command. By default it uses
Expand All @@ -75,10 +75,10 @@ mode and so on.
Example:

```bash
./run.sh main.yml --list-tasks
./run.sh main.yml -t backup -t spotify
./run.sh main.yml -t packages -t restic
./run.sh main.yml -t spotify --diff -C
./run.sh playbooks/default.yml --list-tasks
./run.sh playbooks/default.yml -t packages
./run.sh playbooks/default.yml -t packages --diff --check
./run.sh playbooks/default.yml -t git -t chrome
```

## Thanks
Expand Down
1 change: 0 additions & 1 deletion config.flaudisio.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ packages_apt_install:
- printer-driver-cups-pdf
- rename
- sqlite3
- transmission-qt
- unar
- unrar
- unzip
Expand Down
2 changes: 0 additions & 2 deletions playbooks/common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@
# IDEs & development tools
- role: vscode
tags: vscode
- role: q
tags: q

# Misc. applications
- role: discord
Expand Down
6 changes: 2 additions & 4 deletions main.yml → playbooks/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,11 @@
tags: packages
- role: git
tags: git
- role: mise
tags: mise
- role: chrome
tags: chrome
- role: geerlingguy.docker
tags: docker
- role: mise
tags: mise
- role: bat
tags: bat
- role: vscode
tags: vscode
2 changes: 2 additions & 0 deletions roles/local/chrome/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
---
chrome_package_url: https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb

chrome_set_as_default_browser: false
12 changes: 12 additions & 0 deletions roles/local/chrome/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,15 @@
deb: "{{ chrome_package_url }}"
state: present
when: "'google-chrome-stable' not in ansible_facts.packages"

- name: Set Chrome as default browser in Alternatives
community.general.alternatives:
name: "{{ item }}"
link: /usr/bin/{{ item }}
path: /usr/bin/google-chrome-stable
priority: 100
state: selected
loop:
- gnome-www-browser
- x-www-browser
when: chrome_set_as_default_browser | bool
5 changes: 2 additions & 3 deletions roles/local/git/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,12 @@ git_extra_packages:
- qgit
- tig

git_open_version: 3.1.0
git_open_version: 41ebfceb

git_open_dl_url: https://raw.githubusercontent.com/paulirish/git-open/v{{ git_open_version }}/git-open
git_open_dl_url: https://raw.githubusercontent.com/paulirish/git-open/{{ git_open_version }}/git-open

git_open_bin_path: /usr/local/bin/git-open

# Example:
# git_config: |
# [user]
# name = Example User
Expand Down
2 changes: 1 addition & 1 deletion roles/local/mise/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
# Ref: https://mise.jdx.dev/installing-mise.html#github-releases

mise_version: 2025.12.0
mise_version: 2026.5.7

mise_bin_dl_arch: "{{ 'arm64' if ansible_facts.architecture == 'aarch64' else 'x64' }}"

Expand Down
7 changes: 7 additions & 0 deletions roles/local/packages/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ packages_apt_remove: []
packages_apt_purge: true
packages_apt_autoremove: false

# packages_apt_pin_versions:
# - package: alloy
# version: 1.16.1
# - package: nginx
# version: 1.24.0-*
packages_apt_pin_versions: []

# Snap

packages_snap_remove_snapd: false
Expand Down
16 changes: 16 additions & 0 deletions roles/local/packages/tasks/apt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,19 @@
purge: "{{ packages_apt_purge }}"
when: packages_apt_autoremove | bool
tags: packages:apt:autoremove

- name: Configure version pinnings
ansible.builtin.template:
src: apt/version-pinning.j2
dest: /etc/apt/preferences.d/ansible-version-pinning
owner: root
group: root
mode: "0644"
lstrip_blocks: true
when: packages_apt_pin_versions | length > 0

- name: Ensure version pinning configuration is absent
ansible.builtin.file:
path: /etc/apt/preferences.d/ansible-version-pinning
state: absent
when: packages_apt_pin_versions | length == 0
7 changes: 7 additions & 0 deletions roles/local/packages/templates/apt/version-pinning.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{% for item in packages_apt_pin_versions %}
Package: {{ item.package }}
Pin: version {{ item.version }}
Pin-Priority: 700
{# Empty line for better readability #}

{% endfor %}
5 changes: 0 additions & 5 deletions roles/local/q/defaults/main.yml

This file was deleted.

11 changes: 0 additions & 11 deletions roles/local/q/tasks/main.yml

This file was deleted.

2 changes: 1 addition & 1 deletion roles/local/rclone/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
rclone_version: 1.73.1
rclone_version: 1.74.1

rclone_package_arch: "{{ 'arm64' if ansible_facts.architecture == 'aarch64' else 'amd64' }}"

Expand Down
2 changes: 1 addition & 1 deletion roles/local/restic/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
group: "{{ restic_bin_group }}"
mode: "{{ restic_bin_mode }}"

- name: Configure non-root user capabilities on binary file
- name: Set binary file capabilities
community.general.capabilities:
path: "{{ restic_bin_path }}"
capability: cap_dac_read_search=+ep
Expand Down
2 changes: 1 addition & 1 deletion roles/local/resticprofile/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
resticprofile_version: 0.32.0
resticprofile_version: 0.33.1

resticprofile_dl_arch: "{{ 'arm64' if ansible_facts.architecture == 'aarch64' else 'amd64' }}"

Expand Down
2 changes: 1 addition & 1 deletion roles/local/resticprofile/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
src: "{{ resticprofile_dl_url }}"
dest: "{{ resticprofile_bin_path | dirname }}"
include:
- resticprofile # Extract only the binary
- resticprofile
owner: root
group: root
mode: "0755"
Expand Down
1 change: 1 addition & 0 deletions templates/resticprofile/excludes.txt.j2
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ restic-ignored/
/home/*/.local/share/GitKrakenCLI
/home/*/.local/share/helm
/home/*/.local/share/mise
/home/*/.local/share/org.gnome.SoundRecorder
/home/*/.local/share/Trash
/home/*/.local/share/uv
/home/*/.local/share/virtualenv
Expand Down
4 changes: 4 additions & 0 deletions templates/resticprofile/includes.txt.j2
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,7 @@
/home
/root
/usr/local/bin

{% for dir in __rp_extra_backup_dirs | default([]) %}
{{ dir }}
{% endfor %}
4 changes: 3 additions & 1 deletion templates/resticprofile/profiles.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ global:
schedule-defaults:
ignore-on-battery-less-than: 30
lock-wait: 15m
log: {{ resticprofile_log_dir }}/{{ '{{ .Profile.Name }}' }}.log

.base:
lock: /tmp/resticprofile.{{ '{{ .Profile.Name }}' }}.lock
Expand Down Expand Up @@ -75,6 +74,9 @@ global:

default:
inherit: {{ __rp_default_profile }}
{% if __rp_prometheus_save_to_file | default("") != "" %}
prometheus-save-to-file: {{ __rp_prometheus_save_to_file }}
{% endif %}

main:
inherit: .base
Expand Down
Loading