style: add YAML document start markers to Ansible playbooks and tasks
Some checks failed
Ansible Lint Check / check-ansible (push) Failing after 1m34s
Nix Format Check / check-format (push) Successful in 57s

This commit is contained in:
2025-03-12 14:05:42 +01:00
parent 785bd9b122
commit 112d3679da
36 changed files with 202 additions and 31 deletions

View File

@@ -1,2 +1,3 @@
---
flatpaks: false
install_ui_apps: false

View File

@@ -1,2 +1,3 @@
---
flatpaks: true
install_ui_apps: true
install_ui_apps: true

View File

@@ -1,3 +1,4 @@
---
- name: Configure all hosts
hosts: all
handlers:

View File

@@ -1,3 +1,4 @@
---
- name: Check if Docker CE is installed
ansible.builtin.command: docker --version
register: docker_check
@@ -8,7 +9,7 @@
ansible.builtin.get_url:
url: https://get.docker.com
dest: /tmp/get-docker.sh
mode: '0755'
mode: "0755"
when: docker_check.rc != 0
- name: Install Docker CE

View File

@@ -1,3 +1,4 @@
---
- name: Include global symlinks tasks
ansible.builtin.import_tasks: tasks/global/symlinks.yml
@@ -45,4 +46,4 @@
ansible.builtin.file:
path: ~/.hushlogin
state: touch
mode: '0644'
mode: "0644"

View File

@@ -1,3 +1,4 @@
---
- name: Check if Ollama is installed
ansible.builtin.command: ollama --version
register: ollama_check
@@ -8,7 +9,7 @@
ansible.builtin.get_url:
url: https://ollama.com/install.sh
dest: /tmp/install_ollama.sh
mode: '0755'
mode: "0755"
when: ollama_check.rc != 0
- name: Install Ollama

View File

@@ -1,3 +1,4 @@
---
- name: Ensure openssh-server is installed
ansible.builtin.package:
name: openssh-server
@@ -15,6 +16,6 @@
dest: /etc/ssh/sshd_config
owner: root
group: root
mode: '0644'
validate: '/usr/sbin/sshd -t -f %s'
mode: "0644"
validate: "/usr/sbin/sshd -t -f %s"
notify: Restart SSH service

View File

@@ -1,3 +1,4 @@
---
- name: Check if Rust is installed
ansible.builtin.shell: source $HOME/.cargo/env && rustc --version
register: rust_check
@@ -10,7 +11,7 @@
ansible.builtin.get_url:
url: https://sh.rustup.rs
dest: /tmp/rustup.sh
mode: '0755'
mode: "0755"
when: rust_check.rc != 0
- name: Install Rust and Cargo

View File

@@ -1,3 +1,4 @@
---
- name: Set user home directory
ansible.builtin.set_fact:
user_home: "{{ ansible_env.HOME if ansible_user_id == 'root' else lookup('env', 'HOME') }}"

View File

@@ -1,3 +1,4 @@
---
- name: Check if Tailscale is installed
ansible.builtin.command: which tailscale
register: tailscale_check

View File

@@ -1,3 +1,4 @@
---
- name: Server setup
block:
- name: Ensure server common packages are installed

View File

@@ -1,3 +1,4 @@
---
- name: Deploy Caddy service
block:
- name: Set Caddy directories

View File

@@ -1,3 +1,4 @@
---
- name: Deploy Gitea service
block:
- name: Set Gitea directories

View File

@@ -1,3 +1,4 @@
---
- name: Deploy GoLink service
block:
- name: Set GoLink directories

View File

@@ -1,3 +1,4 @@
---
- name: Deploy Hoarder service
block:
- name: Set Hoarder directories

View File

@@ -1,3 +1,4 @@
---
- name: Deploy Immich service
block:
- name: Set Immich directories

View File

@@ -1,3 +1,4 @@
---
- name: Include caddy tasks
ansible.builtin.include_tasks: caddy/caddy.yml
when: caddy_enabled|bool

View File

@@ -1,3 +1,4 @@
---
- name: Install ZFS
ansible.builtin.package:
name:

View File

@@ -1,3 +1,4 @@
---
- name: Check if 1Password is installed
ansible.builtin.command: 1password --version
register: onepassword_check
@@ -14,7 +15,7 @@
ansible.builtin.file:
path: /etc/1password
state: directory
mode: '0755'
mode: "0755"
become: true
- name: Add Zen browser to 1Password custom allowed browsers
@@ -27,7 +28,7 @@
dest: /etc/1password/custom_allowed_browsers
owner: root
group: root
mode: '0755'
mode: "0755"
become: true
register: custom_browsers_file

View File

@@ -14,7 +14,7 @@
ansible.builtin.get_url:
url: https://packagecloud.io/filips/FirefoxPWA/gpgkey
dest: /usr/share/keyrings/firefoxpwa-keyring.gpg
mode: '0644'
mode: "0644"
become: true
- name: Import FirefoxPWA GPG key
@@ -28,7 +28,7 @@
ansible.builtin.copy:
content: "deb [signed-by=/usr/share/keyrings/firefoxpwa-keyring.gpg] https://packagecloud.io/filips/FirefoxPWA/any any main"
dest: /etc/apt/sources.list.d/firefoxpwa.list
mode: '0644'
mode: "0644"
become: true
- name: Update apt cache

View File

@@ -1,3 +1,4 @@
---
- name: Check if Flatpak is installed
ansible.builtin.command: which flatpak
register: flatpak_check

View File

@@ -1,3 +1,4 @@
---
- name: Install Pano - Clipboard Manager dependencies
ansible.builtin.apt:
name:

View File

@@ -35,14 +35,14 @@
ansible.builtin.file:
path: "{{ extension_path }}"
state: directory
mode: '0755'
mode: "0755"
when: not ext_check.stat.exists or update_needed
- name: Download extension
ansible.builtin.get_url:
url: "{{ extension_url | replace('%TAG%', requested_git_tag) }}"
dest: "{{ extension_path }}/release.zip"
mode: '0644'
mode: "0644"
when: update_needed or not ext_check.stat.exists
- name: Extract extension
@@ -55,7 +55,7 @@
ansible.builtin.copy:
content: "{{ requested_git_tag }}"
dest: "{{ version_file }}"
mode: '0644'
mode: "0644"
when: update_needed or not ext_check.stat.exists
- name: Cleanup post installation

View File

@@ -1,3 +1,4 @@
---
- name: Manage Pano Clipboard Manager
ansible.builtin.include_tasks: tasks/workstations/gnome-extensions/manage_gnome_extension.yml
vars:

View File

@@ -1,3 +1,4 @@
---
- name: Manage Tiling Shell - Window Manager
ansible.builtin.include_tasks: tasks/workstations/gnome-extensions/manage_gnome_extension.yml
vars:

View File

@@ -19,21 +19,21 @@
ansible.builtin.get_url:
url: https://mega.nz/linux/repo/xUbuntu_24.10/amd64/megasync-xUbuntu_24.10_amd64.deb
dest: "{{ temp_download_dir.path }}/megasync.deb"
mode: '0644'
mode: "0644"
when: megasync_check.rc != 0
- name: Download MegaSync Nautilus DEB Package
ansible.builtin.get_url:
url: https://mega.nz/linux/repo/xUbuntu_24.04/amd64/nautilus-megasync-xUbuntu_24.04_amd64.deb
dest: "{{ temp_download_dir.path }}/megasync-nautilus-extras.deb"
mode: '0644'
mode: "0644"
when: megasync_check.rc != 0
- name: Downlod MegaSync Nemo DEB Package
ansible.builtin.get_url:
url: https://mega.nz/linux/repo/xUbuntu_24.04/amd64/nemo-megasync-xUbuntu_24.04_amd64.deb
dest: "{{ temp_download_dir.path }}/megasync-nemo-extras.deb"
mode: '0644'
mode: "0644"
when: megasync_check.rc != 0
- name: Install MegaSync package

View File

@@ -1,3 +1,4 @@
---
- name: Ensure snapd is installed
ansible.builtin.package:
name: snapd

View File

@@ -1,3 +1,4 @@
---
- name: Set user home directory
ansible.builtin.set_fact:
user_home: "{{ ansible_env.HOME if ansible_user_id == 'root' else lookup('env', 'HOME') }}"

View File

@@ -1,3 +1,4 @@
---
- name: Ensure Ulauncher and dependencies are installed
ansible.builtin.package:
name:
@@ -18,13 +19,13 @@
ansible.builtin.file:
path: "~/.config/ulauncher"
state: directory
mode: '0755'
mode: "0755"
- name: Configure Ulauncher settings
ansible.builtin.copy:
content: "{{ ulauncher_settings | to_json }}"
dest: "~/.config/ulauncher/settings.json"
mode: '0644'
mode: "0644"
vars:
ulauncher_settings:
blacklisted-desktop-dirs: >
@@ -44,7 +45,7 @@
ansible.builtin.copy:
content: "{{ ulauncher_shortcuts | to_json }}"
dest: "~/.config/ulauncher/shortcuts.json"
mode: '0644'
mode: "0644"
vars:
ulauncher_shortcuts:
"0bab9d26-5464-4501-bc95-9995d8fa1405":
@@ -70,7 +71,7 @@
name: "GoLink"
keyword: "go"
cmd: "http://go/%s"
icon: null
icon:
is_default_search: false
run_without_argument: false
added: 0
@@ -79,7 +80,7 @@
name: "NixOS"
keyword: "nix"
cmd: "https://search.nixos.org/packages?query=%s"
icon: null
icon:
is_default_search: false
run_without_argument: false
added: 0
@@ -88,7 +89,7 @@
name: "Flathub"
keyword: "flat"
cmd: "https://flathub.org/apps/search?q=%s"
icon: null
icon:
is_default_search: false
run_without_argument: false
added: 0
@@ -97,7 +98,7 @@
name: "GitHub"
keyword: "gh"
cmd: "https://github.com/search?q=%s"
icon: null
icon:
is_default_search: false
run_without_argument: false
added: 0

View File

@@ -1,3 +1,4 @@
---
- name: Gather OS facts
ansible.builtin.setup:
filter: ansible_distribution
@@ -18,12 +19,12 @@
gpgcheck=1
gpgkey=https://packages.microsoft.com/keys/microsoft.asc
dest: /etc/yum.repos.d/vscode.repo
mode: '0644'
mode: "0644"
when: os_facts.ansible_facts.ansible_distribution == 'Fedora'
- name: Add VSCode repository (Ubuntu/Debian)
ansible.builtin.apt_repository:
repo: 'deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main'
repo: "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main"
state: present
when: os_facts.ansible_facts.ansible_distribution in ['Ubuntu', 'Debian']

View File

@@ -1,3 +1,4 @@
---
- name: Workstation Setup
block:
- name: Include workstation symlinks tasks

View File

@@ -1,3 +1,4 @@
---
- name: Set Zen browser version
ansible.builtin.set_fact:
zen_browser_version: "1.9b"
@@ -6,14 +7,14 @@
ansible.builtin.file:
path: "/opt/{{ browser_name }}"
state: directory
mode: '0755'
mode: "0755"
become: true
- name: Download Zen browser tarball
ansible.builtin.get_url:
url: "https://github.com/zen-browser/desktop/releases/download/{{ zen_browser_version }}/zen.linux-x86_64.tar.xz"
dest: "/tmp/{{ browser_name }}.tar.xz"
mode: '0644'
mode: "0644"
become: true
- name: Extract browser tarball
@@ -61,7 +62,7 @@
Name=Open the Profile Manager
Exec=/usr/local/bin/{{ browser_name }} --ProfileManager %u
dest: "/usr/share/applications/zen.desktop"
mode: '0644'
mode: "0644"
become: true
- name: Update desktop database
@@ -73,7 +74,7 @@
- name: Make desktop file executable
ansible.builtin.file:
dest: "/usr/share/applications/zen.desktop"
mode: '0755'
mode: "0755"
become: true
- name: Clean up downloaded tarball