add pcloud
This commit is contained in:
@@ -44,6 +44,7 @@ The main switches live near the top of `vars.yml`:
|
|||||||
- `upgrade_system`: upgrade packages before provisioning
|
- `upgrade_system`: upgrade packages before provisioning
|
||||||
- `install_virtualization`: install Fedora's libvirt virtualization group
|
- `install_virtualization`: install Fedora's libvirt virtualization group
|
||||||
- `install_sqlcmd`: retain the Fedora repository's existing SQL Server CLI
|
- `install_sqlcmd`: retain the Fedora repository's existing SQL Server CLI
|
||||||
|
- `install_jdtls`: install Java's JDT LS directly from Eclipse, without Mason
|
||||||
|
|
||||||
## Re-running
|
## Re-running
|
||||||
|
|
||||||
|
|||||||
@@ -28,8 +28,11 @@
|
|||||||
- ansible.builtin.import_tasks: tasks/services.yml
|
- ansible.builtin.import_tasks: tasks/services.yml
|
||||||
- ansible.builtin.import_tasks: tasks/tooling.yml
|
- ansible.builtin.import_tasks: tasks/tooling.yml
|
||||||
- ansible.builtin.import_tasks: tasks/jdtls.yml
|
- ansible.builtin.import_tasks: tasks/jdtls.yml
|
||||||
|
when: install_jdtls
|
||||||
- ansible.builtin.import_tasks: tasks/sqlcmd.yml
|
- ansible.builtin.import_tasks: tasks/sqlcmd.yml
|
||||||
when: install_sqlcmd
|
when: install_sqlcmd
|
||||||
- ansible.builtin.import_tasks: tasks/zen.yml
|
- ansible.builtin.import_tasks: tasks/zen.yml
|
||||||
- ansible.builtin.import_tasks: tasks/dotfiles.yml
|
- ansible.builtin.import_tasks: tasks/dotfiles.yml
|
||||||
- ansible.builtin.import_tasks: tasks/user_config.yml
|
- ansible.builtin.import_tasks: tasks/user_config.yml
|
||||||
|
- ansible.builtin.import_tasks: tasks/pcloud.yml
|
||||||
|
when: install_pcloud
|
||||||
|
|||||||
+68
-25
@@ -1,57 +1,100 @@
|
|||||||
---
|
---
|
||||||
- name: Check for Eclipse JDT Language Server
|
- name: Check for JDT LS
|
||||||
ansible.builtin.stat:
|
ansible.builtin.stat:
|
||||||
path: "{{ jdtls_install_dir }}/bin/jdtls"
|
path: "{{ jdtls_install_dir }}/plugins"
|
||||||
become: false
|
become: false
|
||||||
register: jdtls_binary
|
register: jdtls_installed
|
||||||
|
|
||||||
- name: Create JDT LS installation directories
|
- name: Create JDT LS target directories
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ item }}"
|
path: "{{ item }}"
|
||||||
state: directory
|
state: directory
|
||||||
owner: "{{ user_name }}"
|
|
||||||
mode: "0755"
|
mode: "0755"
|
||||||
become: false
|
|
||||||
loop:
|
loop:
|
||||||
- "{{ jdtls_install_dir }}"
|
- "{{ jdtls_install_dir }}"
|
||||||
- "{{ user_home }}/.local/bin"
|
- "{{ jdtls_bin_dir }}"
|
||||||
|
|
||||||
- name: Read the JDT LS milestone archive name
|
|
||||||
ansible.builtin.uri:
|
|
||||||
url: "{{ jdtls_base_url }}/latest.txt"
|
|
||||||
return_content: true
|
|
||||||
become: false
|
become: false
|
||||||
register: jdtls_latest
|
|
||||||
when: not jdtls_binary.stat.exists
|
|
||||||
|
|
||||||
- name: Download Eclipse JDT Language Server
|
- name: Download Eclipse JDT LS
|
||||||
ansible.builtin.get_url:
|
ansible.builtin.get_url:
|
||||||
url: "{{ jdtls_base_url }}/{{ jdtls_latest.content | trim }}"
|
url: "{{ jdtls_url }}"
|
||||||
dest: "{{ jdtls_archive }}"
|
dest: "{{ jdtls_archive }}"
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
checksum: "sha256:{{ jdtls_base_url }}/{{ jdtls_latest.content | trim }}.sha256"
|
force: "{{ jdtls_force_update }}"
|
||||||
become: false
|
timeout: "{{ jdtls_download_timeout }}"
|
||||||
when: not jdtls_binary.stat.exists
|
register: jdtls_download
|
||||||
|
until: jdtls_download is succeeded
|
||||||
|
retries: "{{ jdtls_download_retries }}"
|
||||||
|
delay: "{{ jdtls_download_delay }}"
|
||||||
|
when: jdtls_force_update or not jdtls_installed.stat.exists
|
||||||
|
|
||||||
- name: Extract Eclipse JDT Language Server
|
- name: Remove existing JDT LS install when forced
|
||||||
|
ansible.builtin.file:
|
||||||
|
path: "{{ jdtls_install_dir }}"
|
||||||
|
state: absent
|
||||||
|
become: false
|
||||||
|
when: jdtls_force_update and jdtls_installed.stat.exists
|
||||||
|
|
||||||
|
- name: Recreate JDT LS install directory
|
||||||
|
ansible.builtin.file:
|
||||||
|
path: "{{ jdtls_install_dir }}"
|
||||||
|
state: directory
|
||||||
|
mode: "0755"
|
||||||
|
become: false
|
||||||
|
when: jdtls_force_update and jdtls_installed.stat.exists
|
||||||
|
|
||||||
|
- name: Extract Eclipse JDT LS
|
||||||
ansible.builtin.unarchive:
|
ansible.builtin.unarchive:
|
||||||
src: "{{ jdtls_archive }}"
|
src: "{{ jdtls_archive }}"
|
||||||
dest: "{{ jdtls_install_dir }}"
|
dest: "{{ jdtls_install_dir }}"
|
||||||
remote_src: true
|
remote_src: true
|
||||||
creates: "{{ jdtls_install_dir }}/bin/jdtls"
|
|
||||||
become: false
|
become: false
|
||||||
when: not jdtls_binary.stat.exists
|
when: jdtls_force_update or not jdtls_installed.stat.exists
|
||||||
|
|
||||||
- name: Link jdtls into the user's PATH
|
- name: Check for bundled JDT LS launcher
|
||||||
|
ansible.builtin.stat:
|
||||||
|
path: "{{ jdtls_install_dir }}/bin/jdtls"
|
||||||
|
become: false
|
||||||
|
register: jdtls_bundled_launcher
|
||||||
|
|
||||||
|
- name: Link bundled JDT LS launcher onto the user PATH
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
src: "{{ jdtls_install_dir }}/bin/jdtls"
|
src: "{{ jdtls_install_dir }}/bin/jdtls"
|
||||||
dest: "{{ user_home }}/.local/bin/jdtls"
|
dest: "{{ jdtls_bin_dir }}/jdtls"
|
||||||
state: link
|
state: link
|
||||||
force: true
|
force: true
|
||||||
become: false
|
become: false
|
||||||
|
when: jdtls_bundled_launcher.stat.exists
|
||||||
|
|
||||||
|
- name: Create fallback JDT LS launcher
|
||||||
|
ansible.builtin.copy:
|
||||||
|
dest: "{{ jdtls_bin_dir }}/jdtls"
|
||||||
|
mode: "0755"
|
||||||
|
content: |
|
||||||
|
#!/bin/bash
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
JDTLS_HOME="{{ jdtls_install_dir }}"
|
||||||
|
LAUNCHER_JAR=$(find "$JDTLS_HOME/plugins" -name "org.eclipse.equinox.launcher_*.jar" | sort | tail -n 1)
|
||||||
|
|
||||||
|
exec java \
|
||||||
|
-Declipse.application=org.eclipse.jdt.ls.core.id1 \
|
||||||
|
-Dosgi.bundles.defaultStartLevel=4 \
|
||||||
|
-Declipse.product=org.eclipse.jdt.ls.core.product \
|
||||||
|
-Dlog.protocol=true \
|
||||||
|
-Dlog.level=ALL \
|
||||||
|
-Xmx1G \
|
||||||
|
--add-modules=ALL-SYSTEM \
|
||||||
|
--add-opens java.base/java.util=ALL-UNNAMED \
|
||||||
|
--add-opens java.base/java.lang=ALL-UNNAMED \
|
||||||
|
-jar "$LAUNCHER_JAR" \
|
||||||
|
-configuration "$JDTLS_HOME/config_linux" \
|
||||||
|
-data "$PWD/.jdtls-workspace" \
|
||||||
|
"$@"
|
||||||
|
become: false
|
||||||
|
when: not jdtls_bundled_launcher.stat.exists
|
||||||
|
|
||||||
- name: Remove downloaded JDT LS archive
|
- name: Remove downloaded JDT LS archive
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ jdtls_archive }}"
|
path: "{{ jdtls_archive }}"
|
||||||
state: absent
|
state: absent
|
||||||
become: false
|
|
||||||
|
|||||||
@@ -0,0 +1,39 @@
|
|||||||
|
---
|
||||||
|
- name: Create pCloud install directory
|
||||||
|
ansible.builtin.file:
|
||||||
|
path: /opt/pcloud
|
||||||
|
state: directory
|
||||||
|
mode: "0755"
|
||||||
|
|
||||||
|
- name: Download pCloud AppImage
|
||||||
|
ansible.builtin.get_url:
|
||||||
|
url: "{{ pcloud_appimage_url }}"
|
||||||
|
dest: /opt/pcloud/pCloud.AppImage
|
||||||
|
mode: "0755"
|
||||||
|
timeout: 300
|
||||||
|
|
||||||
|
- name: Link pCloud onto system PATH
|
||||||
|
ansible.builtin.file:
|
||||||
|
src: /opt/pcloud/pCloud.AppImage
|
||||||
|
dest: /usr/local/bin/pcloud
|
||||||
|
state: link
|
||||||
|
force: true
|
||||||
|
|
||||||
|
- name: Ensure system desktop application directory exists
|
||||||
|
ansible.builtin.file:
|
||||||
|
path: /usr/local/share/applications
|
||||||
|
state: directory
|
||||||
|
mode: "0755"
|
||||||
|
|
||||||
|
- name: Create pCloud desktop launcher
|
||||||
|
ansible.builtin.copy:
|
||||||
|
dest: /usr/local/share/applications/pcloud.desktop
|
||||||
|
mode: "0644"
|
||||||
|
content: |
|
||||||
|
[Desktop Entry]
|
||||||
|
Type=Application
|
||||||
|
Name=pCloud Drive
|
||||||
|
Comment=pCloud Drive desktop client
|
||||||
|
Exec=/usr/local/bin/pcloud
|
||||||
|
Terminal=false
|
||||||
|
Categories=Network;FileTransfer;
|
||||||
+6
-11
@@ -83,22 +83,17 @@
|
|||||||
become: false
|
become: false
|
||||||
register: starship_binary
|
register: starship_binary
|
||||||
|
|
||||||
- name: Download the Starship installer
|
- name: Download Starship installer script
|
||||||
ansible.builtin.get_url:
|
ansible.builtin.get_url:
|
||||||
url: https://starship.rs/install.sh
|
url: https://starship.rs/install.sh
|
||||||
dest: /tmp/starship-install.sh
|
dest: /tmp/install_starship.sh
|
||||||
mode: "0755"
|
mode: '0755'
|
||||||
when: not starship_binary.stat.exists
|
when: not starship_binary.stat.exists
|
||||||
|
|
||||||
- name: Install Starship for the workstation user
|
- name: Run Starship installer
|
||||||
ansible.builtin.command:
|
ansible.builtin.command: /tmp/install_starship.sh -y
|
||||||
argv:
|
|
||||||
- /tmp/starship-install.sh
|
|
||||||
- --yes
|
|
||||||
- --bin-dir
|
|
||||||
- "{{ user_home }}/.local/bin"
|
|
||||||
become: false
|
|
||||||
when: not starship_binary.stat.exists
|
when: not starship_binary.stat.exists
|
||||||
|
become: true
|
||||||
|
|
||||||
- name: Check for Bun
|
- name: Check for Bun
|
||||||
ansible.builtin.stat:
|
ansible.builtin.stat:
|
||||||
|
|||||||
@@ -1,4 +1,54 @@
|
|||||||
---
|
---
|
||||||
|
- name: Ensure XDG config and wanted user directories exist
|
||||||
|
ansible.builtin.file:
|
||||||
|
path: "{{ item.path }}"
|
||||||
|
state: directory
|
||||||
|
owner: "{{ user_name }}"
|
||||||
|
mode: "{{ item.mode }}"
|
||||||
|
loop:
|
||||||
|
- { path: "{{ user_home }}/.config", mode: "0755" }
|
||||||
|
- { path: "{{ user_home }}/Downloads", mode: "0755" }
|
||||||
|
- { path: "{{ user_home }}/Pictures", mode: "0755" }
|
||||||
|
become: false
|
||||||
|
|
||||||
|
- name: Disable automatic XDG user directory creation
|
||||||
|
ansible.builtin.copy:
|
||||||
|
dest: "{{ user_home }}/.config/user-dirs.conf"
|
||||||
|
owner: "{{ user_name }}"
|
||||||
|
mode: "0644"
|
||||||
|
content: |
|
||||||
|
enabled=False
|
||||||
|
become: false
|
||||||
|
|
||||||
|
- name: Keep only Downloads and Pictures as real XDG user directories
|
||||||
|
ansible.builtin.copy:
|
||||||
|
dest: "{{ user_home }}/.config/user-dirs.dirs"
|
||||||
|
owner: "{{ user_name }}"
|
||||||
|
mode: "0644"
|
||||||
|
content: |
|
||||||
|
XDG_DESKTOP_DIR="$HOME"
|
||||||
|
XDG_DOCUMENTS_DIR="$HOME"
|
||||||
|
XDG_DOWNLOAD_DIR="$HOME/Downloads"
|
||||||
|
XDG_MUSIC_DIR="$HOME"
|
||||||
|
XDG_PICTURES_DIR="$HOME/Pictures"
|
||||||
|
XDG_PUBLICSHARE_DIR="$HOME"
|
||||||
|
XDG_TEMPLATES_DIR="$HOME"
|
||||||
|
XDG_VIDEOS_DIR="$HOME"
|
||||||
|
become: false
|
||||||
|
|
||||||
|
- name: Remove unwanted empty XDG directories
|
||||||
|
ansible.builtin.file:
|
||||||
|
path: "{{ user_home }}/{{ item }}"
|
||||||
|
state: absent
|
||||||
|
loop:
|
||||||
|
- Desktop
|
||||||
|
- Documents
|
||||||
|
- Music
|
||||||
|
- Public
|
||||||
|
- Templates
|
||||||
|
- Videos
|
||||||
|
become: false
|
||||||
|
|
||||||
- name: Check for the Git signing public key
|
- name: Check for the Git signing public key
|
||||||
ansible.builtin.stat:
|
ansible.builtin.stat:
|
||||||
path: "{{ git_signing_key }}"
|
path: "{{ git_signing_key }}"
|
||||||
|
|||||||
@@ -4,10 +4,14 @@ user_home: "{{ lookup('env', 'HOME') }}"
|
|||||||
dotfiles_dir: "{{ user_home }}/dotfiles"
|
dotfiles_dir: "{{ user_home }}/dotfiles"
|
||||||
dotfiles_repo: https://codeberg.org/bartal-lsn/dotfiles.git
|
dotfiles_repo: https://codeberg.org/bartal-lsn/dotfiles.git
|
||||||
dotfiles_ssh_repo: git@codeberg.org:bartal-lsn/dotfiles.git
|
dotfiles_ssh_repo: git@codeberg.org:bartal-lsn/dotfiles.git
|
||||||
jdtls_version: "1.60.0"
|
jdtls_url: https://download.eclipse.org/jdtls/snapshots/jdt-language-server-latest.tar.gz
|
||||||
jdtls_base_url: "https://download.eclipse.org/jdtls/milestones/{{ jdtls_version }}"
|
|
||||||
jdtls_install_dir: "{{ user_home }}/.local/share/jdtls"
|
jdtls_install_dir: "{{ user_home }}/.local/share/jdtls"
|
||||||
|
jdtls_bin_dir: "{{ user_home }}/.local/bin"
|
||||||
jdtls_archive: /tmp/jdtls.tar.gz
|
jdtls_archive: /tmp/jdtls.tar.gz
|
||||||
|
jdtls_force_update: false
|
||||||
|
jdtls_download_timeout: 300
|
||||||
|
jdtls_download_retries: 3
|
||||||
|
jdtls_download_delay: 10
|
||||||
|
|
||||||
system_timezone: Atlantic/Faroe
|
system_timezone: Atlantic/Faroe
|
||||||
system_locale: en_US.UTF-8
|
system_locale: en_US.UTF-8
|
||||||
@@ -17,6 +21,9 @@ keyboard_layout: fo
|
|||||||
upgrade_system: true
|
upgrade_system: true
|
||||||
install_virtualization: true
|
install_virtualization: true
|
||||||
install_sqlcmd: true
|
install_sqlcmd: true
|
||||||
|
install_jdtls: true
|
||||||
|
install_pcloud: true
|
||||||
|
pcloud_appimage_url: "https://plon1.pcloud.com/cBZeyCak57Ztkt7yq7ZZZ8t965kZ2ZZec4ZkZ9KHBHZJgZCzZrLZeFZ94ZkLZ5LZWQZr4Z6YZrFZmLZyQZoTZtwII5ZsVYEJTHXlFSbr5cyP1riD5WTyYYV/pCloud.AppImage"
|
||||||
|
|
||||||
fedora_packages:
|
fedora_packages:
|
||||||
# Media and documents
|
# Media and documents
|
||||||
|
|||||||
Reference in New Issue
Block a user