mirror of
https://github.com/fscotto/infra.git
synced 2026-11-25 21:29:51 +00:00
Compare commits
2 Commits
695fdf4711
...
f09a708fe9
| Author | SHA1 | Date | |
|---|---|---|---|
| f09a708fe9 | |||
| ccb4a0daa6 |
@@ -56,6 +56,7 @@ Ansible-driven personal infrastructure repo for Fedora and Void desktops, Fedora
|
||||
- Focused checks:
|
||||
- Emacs is disabled by default; temporary Emacs check: `ansible-playbook ansible/site.yml --limit <host> --tags emacs --check --diff -e emacs_enabled=true`
|
||||
- AI coding agents: `ansible-playbook ansible/site.yml --limit <host> --tags ai_agents --check --diff`
|
||||
- AI desktop apps lifecycle: `ansible-playbook ansible/site.yml --limit ikaros --tags chatgpt,opencode_desktop,cline_desktop --check --diff`
|
||||
- Mail bootstrap: `sh -n scripts/bootstrap_mail.sh` and `shellcheck scripts/bootstrap_mail.sh`
|
||||
- Thunderbird iCloud profile: `ansible-playbook ansible/site.yml --limit ikaros --tags thunderbird --check --diff`
|
||||
- Server NPM Quadlet: `systemctl status prometheus-npm.service`; the Compose fallback is retired.
|
||||
@@ -551,6 +552,9 @@ validated exports of older historical data will use a dedicated Atlas NFS datase
|
||||
- `dotfiles_common` deploys `ai_agents_dotfiles` and renders `ai_agents_templates` only when deployment is enabled.
|
||||
- Removal is limited to the managed npm packages and `/usr/local/bin/bob`; never remove agent dotfiles, instructions, credentials, or user data.
|
||||
- Keep `.config/ai/` as the common instruction source; update agent-specific entrypoints to reference it rather than duplicating instruction text.
|
||||
- Fedora desktop AI apps (`chatgpt_desktop`, `opencode_desktop`, `cline_desktop`) follow the same lifecycle pattern through `ai_desktop_apps` in `ansible/inventory/group_vars/fedora.yml`; `install_enabled` and `uninstall_enabled` are independent per app and mutually exclusive (enforced by the common pre-task).
|
||||
- ChatGPT opts in per host (`ikaros`, `nymph`); Cline opts in through `desktop_gnome` group vars; OpenCode Desktop keeps removal selected by default because Cline replaced it.
|
||||
- Desktop-app removal deletes only managed artifacts: the RPM package (`chatgpt`, `opencode`, `cline`), ChatGPT's managed repository and signing key, and every cached download; it never removes user data, GNOME favorites, or the npm-managed CLI counterparts.
|
||||
|
||||
## Tooling Notes
|
||||
- Install local tooling with:
|
||||
|
||||
62
README.md
62
README.md
@@ -63,9 +63,11 @@ nymph is allowed to break
|
||||
|
||||
`ikaros` is the stable personal Fedora/GNOME desktop. `nymph` is the laptop and gets the same shared desktop dotfiles while GNOME itself stays close to the Fedora defaults. The legacy `void` and `desktop` groups are compatibility parents; the main axes are `platform_*`, `role_*`, and `desktop_*`.
|
||||
|
||||
The official ChatGPT desktop RPM is enabled only on `ikaros` and `nymph`. The
|
||||
playbook configures OpenAI's signed RPM repository and imports its pinned RPM
|
||||
signing key before installation; subsequent updates are handled by DNF.
|
||||
The official ChatGPT desktop RPM is installed only on `ikaros` and `nymph`
|
||||
through their `chatgpt_desktop_install_enabled` host overrides. The playbook
|
||||
configures OpenAI's signed RPM repository and imports its pinned RPM signing
|
||||
key before installation; subsequent updates are handled by DNF. Enabling
|
||||
`chatgpt_desktop_uninstall_enabled` removes the package, repository, and key.
|
||||
|
||||
## Deferred planned node: Cerberus
|
||||
|
||||
@@ -620,34 +622,54 @@ only in the entry for the agent being removed, then run:
|
||||
ansible-playbook ansible/site.yml --limit deadalus --tags ai_agents --check --diff
|
||||
```
|
||||
|
||||
### OpenCode Desktop on Fedora
|
||||
### AI desktop applications
|
||||
|
||||
`packages_fedora` also installs the [official OpenCode Desktop RPM](https://opencode.ai/download)
|
||||
on the Fedora/GNOME workstations `ikaros` and `nymph`. WSL, Fedora IoT, Void,
|
||||
and servers are excluded. This is independent of the npm-managed OpenCode CLI;
|
||||
its configuration, credentials, and lifecycle flags remain unchanged.
|
||||
The same lifecycle-flag pattern manages the Fedora desktop applications
|
||||
through `ai_desktop_apps` in `ansible/inventory/group_vars/fedora.yml`.
|
||||
`chatgpt_desktop`, `opencode_desktop` and `cline_desktop` each expose
|
||||
`install_enabled` and `uninstall_enabled`, and the common pre-task rejects
|
||||
both being true for the same app. ChatGPT opts in per host (`ikaros`, `nymph`),
|
||||
Cline opts in through `desktop_gnome` group vars, and OpenCode Desktop keeps
|
||||
removal selected because Cline replaced it.
|
||||
|
||||
Removal deletes only what the playbook manages — the installed RPM package,
|
||||
ChatGPT's managed repository and signing key, and every cached download — and
|
||||
leaves GNOME favorites, user data, and the npm-managed CLI counterparts
|
||||
untouched. To switch an app between installed and removed, flip exactly one
|
||||
of its lifecycle flags, then preview with:
|
||||
|
||||
```bash
|
||||
ansible-playbook ansible/site.yml --limit ikaros --tags chatgpt,opencode_desktop,cline_desktop --check --diff
|
||||
```
|
||||
|
||||
### Cline Desktop on Fedora
|
||||
|
||||
The [official Cline Desktop RPM](https://cline.bot/desktop) is managed on the
|
||||
Fedora/GNOME workstations `ikaros` and `nymph`. WSL, Fedora IoT, Void and servers
|
||||
are excluded. The GNOME profile pins `Cline.desktop` in the position of an old
|
||||
OpenCode favorite, or appends it if there was no OpenCode favorite. Other
|
||||
favorites keep their order. Run the playbook from an active GNOME session.
|
||||
|
||||
The version and per-architecture SHA-256 digests are pinned in
|
||||
`ansible/inventory/group_vars/fedora.yml`; update both together from the official
|
||||
[GitHub release](https://github.com/anomalyco/opencode/releases).
|
||||
Confirm the current Desktop version through the official download page, not
|
||||
GitHub's `/releases/latest` endpoint alone: on 2026-11-01 the official RPM download
|
||||
resolved to 2.2.5 while GitHub's `latest` still selected 1.19.5. The 1.x Desktop
|
||||
can reject free models and require an upgrade. Desktop is pinned to 2.2.5;
|
||||
the separately managed CLI remains unchanged.
|
||||
Upstream RPMs are unsigned, so only this DNF task disables signature checking,
|
||||
after verifying the downloaded RPM against its pinned checksum. No repository
|
||||
signature policy is changed. Set `opencode_desktop_enabled: false` to stop managing
|
||||
installation without uninstalling the application.
|
||||
[Desktop release](https://github.com/cline/cline/releases/tag/desktop-v0.0.49).
|
||||
Only the checksum-verified local RPM installation disables DNF signature
|
||||
checking; no repository policy is changed. The Cline VS Code extension and
|
||||
npm-managed CLIs are independent of this app.
|
||||
|
||||
```bash
|
||||
ansible-playbook ansible/site.yml --limit ikaros --tags opencode_desktop --check --diff
|
||||
ansible-playbook ansible/site.yml --limit ikaros --tags opencode_desktop -K
|
||||
ansible-playbook ansible/site.yml --limit ikaros --tags cline_desktop --check --diff
|
||||
ansible-playbook ansible/site.yml --limit ikaros --tags cline_desktop -K
|
||||
```
|
||||
|
||||
Run locally on each workstation (`ansible_connection: local`); use `--limit nymph`
|
||||
on the laptop. With a cold RPM cache, check mode reports that dependency resolution
|
||||
is not validated; the real run downloads, verifies, and installs the package.
|
||||
Cline replaced OpenCode Desktop: its `ai_desktop_apps` entry keeps
|
||||
`opencode_desktop_uninstall_enabled: true` by default, so a previously
|
||||
installed `opencode` RPM converges away on graphical hosts. Flip the entry's
|
||||
flags to reinstall the pinned release instead. Neither removal touches the
|
||||
npm CLI or user data.
|
||||
|
||||
### Thunderbird iCloud profile on Fedora
|
||||
|
||||
|
||||
@@ -103,6 +103,9 @@ gemini_cli_deploy_enabled: true
|
||||
gemini_cli_uninstall_enabled: false
|
||||
claude_code_install_enabled: false
|
||||
claude_code_uninstall_enabled: true
|
||||
cline_install_enabled: true
|
||||
cline_deploy_enabled: false
|
||||
cline_uninstall_enabled: false
|
||||
|
||||
# npm registry requests can be interrupted transiently. Keep retries bounded
|
||||
# so persistent proxy, DNS, or registry failures still fail the play clearly.
|
||||
@@ -140,6 +143,11 @@ ai_agents:
|
||||
install_enabled: "{{ gemini_cli_install_enabled }}"
|
||||
deploy_enabled: "{{ gemini_cli_deploy_enabled }}"
|
||||
uninstall_enabled: "{{ gemini_cli_uninstall_enabled }}"
|
||||
cline:
|
||||
npm_package: cline
|
||||
install_enabled: "{{ cline_install_enabled }}"
|
||||
deploy_enabled: "{{ cline_deploy_enabled }}"
|
||||
uninstall_enabled: "{{ cline_uninstall_enabled }}"
|
||||
github_copilot:
|
||||
npm_package: "@github/copilot"
|
||||
install_enabled: false
|
||||
|
||||
@@ -4,7 +4,9 @@ desktop_environment: gnome
|
||||
desktop_sessions_enabled: []
|
||||
desktop_default_session: gnome
|
||||
emacs_enabled: true
|
||||
opencode_desktop_enabled: true
|
||||
# Cline Desktop is installed (and pinned in the GNOME favorites) on every
|
||||
# GNOME host; set cline_desktop_uninstall_enabled here to remove it instead.
|
||||
cline_desktop_install_enabled: true
|
||||
|
||||
# Fedora Workstation/GNOME desktop applications. Keep this profile separate from
|
||||
# workstation_* so nymph can remain a desktop laptop rather than a dev workstation.
|
||||
@@ -139,5 +141,6 @@ vscode_extensions:
|
||||
- ms-vscode.remote-server
|
||||
- redhat.vscode-xml
|
||||
- redhat.vscode-yaml
|
||||
- saoudrizwan.claude-dev
|
||||
- vscodevim.vim
|
||||
vscode_settings: null
|
||||
|
||||
@@ -63,6 +63,21 @@ fedora_dev_packages:
|
||||
fedora_flatpak_remote_name: flathub
|
||||
fedora_flatpak_remote_url: https://dl.flathub.org/repo/flathub.flatpakrepo
|
||||
|
||||
cline_desktop_version: "0.0.49"
|
||||
# Launcher file shipped by the pinned RPM; the GNOME profile pins it in the
|
||||
# favorites while installation stays enabled.
|
||||
cline_desktop_launcher: Cline.desktop
|
||||
# Digests published with the official GitHub release; update with the version.
|
||||
cline_desktop_rpm_checksums:
|
||||
x86_64: sha256:e10036a036ee531451695559e2c96feceb3d621408a6615bdd708ffcf9e778ab
|
||||
aarch64: sha256:aec36edb594bdc400b0c2275230f29de6814a78ad60add4938347d20cfb93b74
|
||||
cline_desktop_rpm_url: >-
|
||||
https://github.com/cline/cline/releases/download/desktop-v{{ cline_desktop_version }}/Cline_{{ cline_desktop_version }}_{{ ansible_facts['architecture'] }}.rpm
|
||||
cline_desktop_rpm_path: "/var/cache/cline-desktop-{{ cline_desktop_version }}-{{ ansible_facts['architecture'] }}.rpm"
|
||||
|
||||
# OpenCode Desktop was replaced by Cline Desktop. The pinned release stays
|
||||
# available for reinstall, while removal is selected in the lifecycle flags
|
||||
# below so leftovers from the switch converge away on graphical hosts.
|
||||
opencode_desktop_version: "2.2.5"
|
||||
# Digests published with the official GitHub release; update with the version.
|
||||
opencode_desktop_rpm_checksums:
|
||||
@@ -72,7 +87,26 @@ opencode_desktop_rpm_url: >-
|
||||
https://github.com/anomalyco/opencode/releases/download/v{{ opencode_desktop_version }}/opencode-desktop-linux-{{ ansible_facts['architecture'] }}.rpm
|
||||
opencode_desktop_rpm_path: "/var/cache/opencode-desktop-{{ opencode_desktop_version }}-{{ ansible_facts['architecture'] }}.rpm"
|
||||
|
||||
chatgpt_desktop_enabled: false
|
||||
# AI desktop-app lifecycle controls are independent for every app and mirror
|
||||
# the CLI coding-agent flags. Installation and removal are mutually exclusive
|
||||
# per app; the common pre-task enforces this before any changes are made.
|
||||
# ChatGPT opts in per host, Cline opts in through desktop_gnome group vars.
|
||||
chatgpt_desktop_install_enabled: false
|
||||
chatgpt_desktop_uninstall_enabled: false
|
||||
opencode_desktop_install_enabled: false
|
||||
opencode_desktop_uninstall_enabled: true
|
||||
|
||||
ai_desktop_apps:
|
||||
chatgpt_desktop:
|
||||
install_enabled: "{{ chatgpt_desktop_install_enabled }}"
|
||||
uninstall_enabled: "{{ chatgpt_desktop_uninstall_enabled }}"
|
||||
opencode_desktop:
|
||||
install_enabled: "{{ opencode_desktop_install_enabled }}"
|
||||
uninstall_enabled: "{{ opencode_desktop_uninstall_enabled }}"
|
||||
cline_desktop:
|
||||
install_enabled: "{{ cline_desktop_install_enabled | default(false) }}"
|
||||
uninstall_enabled: "{{ cline_desktop_uninstall_enabled | default(false) }}"
|
||||
|
||||
chatgpt_desktop_supported_fedora_versions:
|
||||
- "43"
|
||||
- "44"
|
||||
|
||||
@@ -1,6 +1,12 @@
|
||||
---
|
||||
emacs_enabled: true
|
||||
|
||||
workstation_git_https_cas:
|
||||
- url: https://gitlab.ecaas.datacenter.comune.roma
|
||||
certificate: ecaas.datacenter.comune.roma.crt
|
||||
- url: https://gitlab.datacenter.comune.roma
|
||||
certificate: datacenter.comune.roma.crt
|
||||
|
||||
workstation_user_directories:
|
||||
- path: "{{ user_home }}/.config"
|
||||
mode: "0755"
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
---
|
||||
hostname: deadalus
|
||||
workstation_wsl_windows_user_home: /mnt/c/Users/FABIOSCOTTODISANTOLO
|
||||
workstation_ecaas_workspace: "{{ user_home }}/Work/ecaas"
|
||||
workstation_ecaas_git_required_ca: ecaas.datacenter.comune.roma.crt
|
||||
|
||||
# Codex is not installed or configured on WSL; remove the managed npm package.
|
||||
codex_install_enabled: false
|
||||
|
||||
@@ -6,7 +6,7 @@ codex_relay_uninstall_enabled: true
|
||||
gemini_cli_install_enabled: false
|
||||
gemini_cli_deploy_enabled: false
|
||||
gemini_cli_uninstall_enabled: true
|
||||
chatgpt_desktop_enabled: true
|
||||
chatgpt_desktop_install_enabled: true
|
||||
desktop_ai_media_enabled: true
|
||||
desktop_ai_media_external_storage_enabled: true
|
||||
desktop_ai_media_external_luks_uuid: 6948c504-2d60-4cc8-9e7f-3ccdf28e80d7
|
||||
@@ -254,7 +254,7 @@ gnome_gsettings_settings:
|
||||
- schema: org.gnome.shell
|
||||
key: favorite-apps
|
||||
value: >-
|
||||
['org.gnome.Nautilus.desktop', 'org.mozilla.firefox.desktop', 'com.spotify.Client.desktop', 'net.thunderbird.Thunderbird.desktop', 'org.telegram.desktop.desktop', 'chatgpt.desktop', 'ai.opencode.desktop.desktop', 'com.microsoft.VSCode.desktop', 'org.gnome.Ptyxis.desktop', 'virt-manager.desktop']
|
||||
['org.gnome.Nautilus.desktop', 'org.mozilla.firefox.desktop', 'com.spotify.Client.desktop', 'net.thunderbird.Thunderbird.desktop', 'org.telegram.desktop.desktop', 'chatgpt.desktop', 'Cline.desktop', 'com.microsoft.VSCode.desktop', 'org.gnome.Ptyxis.desktop', 'virt-manager.desktop']
|
||||
- schema: org.gnome.shell
|
||||
key: remember-mount-password
|
||||
value: "true"
|
||||
|
||||
@@ -7,7 +7,7 @@ gemini_cli_install_enabled: false
|
||||
gemini_cli_deploy_enabled: false
|
||||
gemini_cli_uninstall_enabled: true
|
||||
|
||||
chatgpt_desktop_enabled: true
|
||||
chatgpt_desktop_install_enabled: true
|
||||
|
||||
# Fedora Workstation/GNOME laptop target. GNOME is provided by the base Fedora
|
||||
# Workstation install; Ansible deploys shared desktop dotfiles but leaves GNOME
|
||||
|
||||
92
ansible/roles/packages_fedora/tasks/chatgpt_desktop.yml
Normal file
92
ansible/roles/packages_fedora/tasks/chatgpt_desktop.yml
Normal file
@@ -0,0 +1,92 @@
|
||||
---
|
||||
# ChatGPT desktop is installed from OpenAI's signed RPM repository; removal
|
||||
# must clean up the package, the managed repository and its signing key.
|
||||
- name: Validate ChatGPT desktop architecture on Fedora
|
||||
tags: [packages, chatgpt]
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- ansible_facts['architecture'] in chatgpt_desktop_supported_architectures
|
||||
- ansible_facts['distribution_major_version'] in chatgpt_desktop_supported_fedora_versions
|
||||
fail_msg: >-
|
||||
ChatGPT desktop supports Fedora {{ chatgpt_desktop_supported_fedora_versions | join(' and ') }}
|
||||
on x86_64 or aarch64; detected Fedora {{ ansible_facts['distribution_major_version'] }}
|
||||
on {{ ansible_facts['architecture'] }}.
|
||||
when: chatgpt_desktop_install_enabled | default(false) | bool
|
||||
|
||||
- name: Install ChatGPT desktop RPM signing key
|
||||
tags: [packages, chatgpt]
|
||||
ansible.builtin.copy:
|
||||
src: "{{ chatgpt_desktop_rpm_gpg_key }}"
|
||||
dest: "/etc/pki/rpm-gpg/{{ chatgpt_desktop_rpm_gpg_key }}"
|
||||
owner: root
|
||||
group: root
|
||||
mode: "0644"
|
||||
when: chatgpt_desktop_install_enabled | default(false) | bool
|
||||
|
||||
- name: Import ChatGPT desktop RPM signing key
|
||||
tags: [packages, chatgpt]
|
||||
ansible.builtin.rpm_key:
|
||||
state: present
|
||||
key: "/etc/pki/rpm-gpg/{{ chatgpt_desktop_rpm_gpg_key }}"
|
||||
when: chatgpt_desktop_install_enabled | default(false) | bool
|
||||
|
||||
- name: Configure ChatGPT desktop RPM repository
|
||||
tags: [packages, chatgpt]
|
||||
ansible.builtin.yum_repository:
|
||||
name: openai-chatgpt
|
||||
description: ChatGPT
|
||||
baseurl: "{{ chatgpt_desktop_rpm_repository }}"
|
||||
enabled: true
|
||||
gpgcheck: true
|
||||
repo_gpgcheck: true
|
||||
gpgkey: "file:///etc/pki/rpm-gpg/{{ chatgpt_desktop_rpm_gpg_key }}"
|
||||
state: present
|
||||
when: chatgpt_desktop_install_enabled | default(false) | bool
|
||||
|
||||
- name: Install ChatGPT desktop on selected Fedora hosts
|
||||
tags: [packages, chatgpt]
|
||||
ansible.builtin.dnf:
|
||||
name: chatgpt
|
||||
state: latest
|
||||
update_cache: true
|
||||
when: chatgpt_desktop_install_enabled | default(false) | bool
|
||||
|
||||
- name: Check for the installed ChatGPT desktop signing key
|
||||
tags: [packages, chatgpt]
|
||||
ansible.builtin.stat:
|
||||
path: "/etc/pki/rpm-gpg/{{ chatgpt_desktop_rpm_gpg_key }}"
|
||||
get_checksum: false
|
||||
register: chatgpt_desktop_signing_key
|
||||
when: chatgpt_desktop_uninstall_enabled | default(false) | bool
|
||||
|
||||
- name: Remove ChatGPT desktop from selected Fedora hosts
|
||||
tags: [packages, chatgpt]
|
||||
ansible.builtin.dnf:
|
||||
name: chatgpt
|
||||
state: absent
|
||||
when: chatgpt_desktop_uninstall_enabled | default(false) | bool
|
||||
|
||||
- name: Remove ChatGPT desktop RPM repository
|
||||
tags: [packages, chatgpt]
|
||||
ansible.builtin.yum_repository:
|
||||
name: openai-chatgpt
|
||||
state: absent
|
||||
when: chatgpt_desktop_uninstall_enabled | default(false) | bool
|
||||
|
||||
# rpm_key reads the identifier from the key file, so only remove the key from
|
||||
# the RPM database while the deployed file is still present.
|
||||
- name: Remove ChatGPT desktop RPM signing key from the RPM database
|
||||
tags: [packages, chatgpt]
|
||||
ansible.builtin.rpm_key:
|
||||
state: absent
|
||||
key: "/etc/pki/rpm-gpg/{{ chatgpt_desktop_rpm_gpg_key }}"
|
||||
when:
|
||||
- chatgpt_desktop_uninstall_enabled | default(false) | bool
|
||||
- chatgpt_desktop_signing_key.stat.exists | default(false)
|
||||
|
||||
- name: Remove ChatGPT desktop RPM signing key file
|
||||
tags: [packages, chatgpt]
|
||||
ansible.builtin.file:
|
||||
path: "/etc/pki/rpm-gpg/{{ chatgpt_desktop_rpm_gpg_key }}"
|
||||
state: absent
|
||||
when: chatgpt_desktop_uninstall_enabled | default(false) | bool
|
||||
78
ansible/roles/packages_fedora/tasks/cline_desktop.yml
Normal file
78
ansible/roles/packages_fedora/tasks/cline_desktop.yml
Normal file
@@ -0,0 +1,78 @@
|
||||
---
|
||||
# Cline Desktop ships unsigned RPMs from its GitHub releases; only the
|
||||
# checksum-verified download makes the local installation trustworthy.
|
||||
- name: Validate Cline Desktop architecture on Fedora
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- ansible_facts['architecture'] in cline_desktop_rpm_checksums
|
||||
fail_msg: "No verified Cline Desktop RPM for {{ ansible_facts['architecture'] }}."
|
||||
when: cline_desktop_install_enabled | default(false) | bool
|
||||
|
||||
# Runs for both flows so the register below is always valid.
|
||||
- name: Check for cached Cline Desktop RPM
|
||||
ansible.builtin.stat:
|
||||
path: "{{ cline_desktop_rpm_path }}"
|
||||
get_checksum: false
|
||||
register: cline_desktop_rpm_cache
|
||||
|
||||
- name: Download verified Cline Desktop RPM
|
||||
ansible.builtin.get_url:
|
||||
url: "{{ cline_desktop_rpm_url }}"
|
||||
dest: "{{ cline_desktop_rpm_path }}"
|
||||
checksum: "{{ cline_desktop_rpm_checksums[ansible_facts['architecture']] }}"
|
||||
owner: root
|
||||
group: root
|
||||
mode: "0644"
|
||||
# get_url only sends HEAD in check mode and cannot populate a cold cache.
|
||||
when:
|
||||
- cline_desktop_install_enabled | default(false) | bool
|
||||
- not ansible_check_mode
|
||||
|
||||
- name: Install Cline Desktop on Fedora
|
||||
ansible.builtin.dnf:
|
||||
name: "{{ cline_desktop_rpm_path }}"
|
||||
state: present
|
||||
# Upstream ships an unsigned RPM. The download above verifies its pinned
|
||||
# SHA-256; do not disable signature checks in system repository settings.
|
||||
disable_gpg_check: true
|
||||
when:
|
||||
- cline_desktop_install_enabled | default(false) | bool
|
||||
- not ansible_check_mode
|
||||
or cline_desktop_rpm_cache.stat.exists
|
||||
|
||||
- name: Explain Cline Desktop cold-cache check-mode limitation
|
||||
ansible.builtin.debug:
|
||||
msg: >-
|
||||
A real run will download and SHA-256 verify Cline Desktop
|
||||
{{ cline_desktop_version }} before ensuring it is installed.
|
||||
The RPM is not cached, so this dry run cannot validate DNF dependencies.
|
||||
when:
|
||||
- cline_desktop_install_enabled | default(false) | bool
|
||||
- ansible_check_mode
|
||||
- not cline_desktop_rpm_cache.stat.exists
|
||||
|
||||
# The `cline` RPM package name is verified from the pinned release header;
|
||||
# removal never touches the npm-managed cline CLI or user data.
|
||||
- name: Remove Cline Desktop from Fedora
|
||||
ansible.builtin.dnf:
|
||||
name: cline
|
||||
state: absent
|
||||
when: cline_desktop_uninstall_enabled | default(false) | bool
|
||||
|
||||
# Clean every cached download so retirement also removes outdated pins.
|
||||
- name: Find cached Cline Desktop RPM downloads
|
||||
ansible.builtin.find:
|
||||
paths: /var/cache
|
||||
patterns: "cline-desktop-*.rpm"
|
||||
file_type: file
|
||||
register: cline_desktop_cached_rpms
|
||||
when: cline_desktop_uninstall_enabled | default(false) | bool
|
||||
|
||||
- name: Remove cached Cline Desktop RPM downloads
|
||||
ansible.builtin.file:
|
||||
path: "{{ item.path }}"
|
||||
state: absent
|
||||
loop: "{{ cline_desktop_cached_rpms.files | default([]) }}"
|
||||
loop_control:
|
||||
label: "{{ item.path }}"
|
||||
when: cline_desktop_uninstall_enabled | default(false) | bool
|
||||
@@ -168,62 +168,29 @@
|
||||
loop_control:
|
||||
label: "{{ item.key }}"
|
||||
|
||||
- name: Manage OpenCode Desktop on Fedora graphical workstations
|
||||
- name: Manage ChatGPT desktop lifecycle on Fedora graphical hosts
|
||||
tags: [packages, chatgpt]
|
||||
ansible.builtin.import_tasks: chatgpt_desktop.yml
|
||||
when:
|
||||
- "'graphical_desktop' in group_names"
|
||||
- chatgpt_desktop_install_enabled | default(false) | bool
|
||||
or chatgpt_desktop_uninstall_enabled | default(false) | bool
|
||||
|
||||
- name: Manage OpenCode Desktop lifecycle on Fedora graphical hosts
|
||||
tags: [packages, opencode_desktop]
|
||||
ansible.builtin.import_tasks: opencode_desktop.yml
|
||||
when:
|
||||
- "'graphical_desktop' in group_names"
|
||||
- opencode_desktop_enabled | default(false) | bool
|
||||
- opencode_desktop_install_enabled | default(false) | bool
|
||||
or opencode_desktop_uninstall_enabled | default(false) | bool
|
||||
|
||||
- name: Validate ChatGPT desktop architecture on Fedora
|
||||
tags: [packages, chatgpt]
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- ansible_facts['architecture'] in chatgpt_desktop_supported_architectures
|
||||
- ansible_facts['distribution_major_version'] in chatgpt_desktop_supported_fedora_versions
|
||||
fail_msg: >-
|
||||
ChatGPT desktop supports Fedora {{ chatgpt_desktop_supported_fedora_versions | join(' and ') }}
|
||||
on x86_64 or aarch64; detected Fedora {{ ansible_facts['distribution_major_version'] }}
|
||||
on {{ ansible_facts['architecture'] }}.
|
||||
when: chatgpt_desktop_enabled | bool
|
||||
|
||||
- name: Install ChatGPT desktop RPM signing key
|
||||
tags: [packages, chatgpt]
|
||||
ansible.builtin.copy:
|
||||
src: "{{ chatgpt_desktop_rpm_gpg_key }}"
|
||||
dest: "/etc/pki/rpm-gpg/{{ chatgpt_desktop_rpm_gpg_key }}"
|
||||
owner: root
|
||||
group: root
|
||||
mode: "0644"
|
||||
when: chatgpt_desktop_enabled | bool
|
||||
|
||||
- name: Import ChatGPT desktop RPM signing key
|
||||
tags: [packages, chatgpt]
|
||||
ansible.builtin.rpm_key:
|
||||
state: present
|
||||
key: "/etc/pki/rpm-gpg/{{ chatgpt_desktop_rpm_gpg_key }}"
|
||||
when: chatgpt_desktop_enabled | bool
|
||||
|
||||
- name: Configure ChatGPT desktop RPM repository
|
||||
tags: [packages, chatgpt]
|
||||
ansible.builtin.yum_repository:
|
||||
name: openai-chatgpt
|
||||
description: ChatGPT
|
||||
baseurl: "{{ chatgpt_desktop_rpm_repository }}"
|
||||
enabled: true
|
||||
gpgcheck: true
|
||||
repo_gpgcheck: true
|
||||
gpgkey: "file:///etc/pki/rpm-gpg/{{ chatgpt_desktop_rpm_gpg_key }}"
|
||||
state: present
|
||||
when: chatgpt_desktop_enabled | bool
|
||||
|
||||
- name: Install ChatGPT desktop on selected Fedora hosts
|
||||
tags: [packages, chatgpt]
|
||||
ansible.builtin.dnf:
|
||||
name: chatgpt
|
||||
state: latest
|
||||
update_cache: true
|
||||
when: chatgpt_desktop_enabled | bool
|
||||
- name: Manage Cline Desktop lifecycle on Fedora graphical hosts
|
||||
tags: [packages, cline_desktop]
|
||||
ansible.builtin.import_tasks: cline_desktop.yml
|
||||
when:
|
||||
- "'graphical_desktop' in group_names"
|
||||
- cline_desktop_install_enabled | default(false) | bool
|
||||
or cline_desktop_uninstall_enabled | default(false) | bool
|
||||
|
||||
- name: Define Fedora Flatpak applications
|
||||
tags: [packages]
|
||||
|
||||
@@ -1,10 +1,14 @@
|
||||
---
|
||||
# OpenCode Desktop ships unsigned RPMs from its GitHub releases; only the
|
||||
# checksum-verified download makes the local installation trustworthy.
|
||||
- name: Validate OpenCode Desktop architecture on Fedora
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- ansible_facts['architecture'] in opencode_desktop_rpm_checksums
|
||||
fail_msg: "No verified OpenCode Desktop RPM for {{ ansible_facts['architecture'] }}."
|
||||
when: opencode_desktop_install_enabled | default(false) | bool
|
||||
|
||||
# Runs for both flows so the register below is always valid.
|
||||
- name: Check for cached OpenCode Desktop RPM
|
||||
ansible.builtin.stat:
|
||||
path: "{{ opencode_desktop_rpm_path }}"
|
||||
@@ -20,7 +24,9 @@
|
||||
group: root
|
||||
mode: "0644"
|
||||
# get_url only sends HEAD in check mode and cannot populate a cold cache.
|
||||
when: not ansible_check_mode
|
||||
when:
|
||||
- opencode_desktop_install_enabled | default(false) | bool
|
||||
- not ansible_check_mode
|
||||
|
||||
- name: Install OpenCode Desktop on Fedora
|
||||
ansible.builtin.dnf:
|
||||
@@ -29,7 +35,10 @@
|
||||
# Upstream ships an unsigned RPM. The download above verifies its pinned
|
||||
# SHA-256; do not disable signature checks in system repository settings.
|
||||
disable_gpg_check: true
|
||||
when: not ansible_check_mode or opencode_desktop_rpm_cache.stat.exists
|
||||
when:
|
||||
- opencode_desktop_install_enabled | default(false) | bool
|
||||
- not ansible_check_mode
|
||||
or opencode_desktop_rpm_cache.stat.exists
|
||||
|
||||
- name: Explain OpenCode Desktop cold-cache check-mode limitation
|
||||
ansible.builtin.debug:
|
||||
@@ -38,5 +47,32 @@
|
||||
{{ opencode_desktop_version }} before ensuring it is installed.
|
||||
The RPM is not cached, so this dry run cannot validate DNF dependencies.
|
||||
when:
|
||||
- opencode_desktop_install_enabled | default(false) | bool
|
||||
- ansible_check_mode
|
||||
- not opencode_desktop_rpm_cache.stat.exists
|
||||
|
||||
# The `opencode` RPM package name is verified from the pinned release header;
|
||||
# removal never touches the npm-managed opencode-ai CLI or user data.
|
||||
- name: Remove OpenCode Desktop from Fedora
|
||||
ansible.builtin.dnf:
|
||||
name: opencode
|
||||
state: absent
|
||||
when: opencode_desktop_uninstall_enabled | default(false) | bool
|
||||
|
||||
# Clean every cached download so retirement also removes outdated pins.
|
||||
- name: Find cached OpenCode Desktop RPM downloads
|
||||
ansible.builtin.find:
|
||||
paths: /var/cache
|
||||
patterns: "opencode-desktop-*.rpm"
|
||||
file_type: file
|
||||
register: opencode_desktop_cached_rpms
|
||||
when: opencode_desktop_uninstall_enabled | default(false) | bool
|
||||
|
||||
- name: Remove cached OpenCode Desktop RPM downloads
|
||||
ansible.builtin.file:
|
||||
path: "{{ item.path }}"
|
||||
state: absent
|
||||
loop: "{{ opencode_desktop_cached_rpms.files | default([]) }}"
|
||||
loop_control:
|
||||
label: "{{ item.path }}"
|
||||
when: opencode_desktop_uninstall_enabled | default(false) | bool
|
||||
|
||||
56
ansible/roles/profile_desktop_gnome/tasks/cline_desktop.yml
Normal file
56
ansible/roles/profile_desktop_gnome/tasks/cline_desktop.yml
Normal file
@@ -0,0 +1,56 @@
|
||||
---
|
||||
- name: Find the installed Cline Desktop launcher
|
||||
ansible.builtin.stat:
|
||||
path: "/usr/share/applications/{{ cline_desktop_launcher }}"
|
||||
get_checksum: false
|
||||
register: cline_desktop_launcher_stat
|
||||
|
||||
- name: Verify Cline Desktop installed its expected launcher
|
||||
ansible.builtin.assert:
|
||||
that: cline_desktop_launcher_stat.stat.isreg | default(false)
|
||||
fail_msg: "Cline Desktop did not install {{ cline_desktop_launcher }}."
|
||||
when: not ansible_check_mode
|
||||
|
||||
- name: Find the GNOME account for the Cline favorite
|
||||
ansible.builtin.getent:
|
||||
database: passwd
|
||||
key: "{{ username }}"
|
||||
when: cline_desktop_launcher_stat.stat.isreg | default(false)
|
||||
|
||||
- name: Update only the Cline and OpenCode entries in GNOME favorites
|
||||
become_user: "{{ username }}"
|
||||
environment:
|
||||
HOME: "{{ user_home }}"
|
||||
XDG_RUNTIME_DIR: "/run/user/{{ ansible_facts.getent_passwd[username][1] }}"
|
||||
DBUS_SESSION_BUS_ADDRESS: "unix:path=/run/user/{{ ansible_facts.getent_passwd[username][1] }}/bus"
|
||||
when: cline_desktop_launcher_stat.stat.isreg | default(false)
|
||||
block:
|
||||
- name: Read the current GNOME favorites for Cline Desktop
|
||||
ansible.builtin.command:
|
||||
argv: [gsettings, get, org.gnome.shell, favorite-apps]
|
||||
register: cline_gnome_favorites_current
|
||||
changed_when: false
|
||||
check_mode: false
|
||||
|
||||
- name: Pin the Cline Desktop launcher without reordering other favorites
|
||||
ansible.builtin.command:
|
||||
argv:
|
||||
- gsettings
|
||||
- set
|
||||
- org.gnome.shell
|
||||
- favorite-apps
|
||||
- "{{ cline_gnome_favorites_desired | to_json }}"
|
||||
vars:
|
||||
cline_gnome_favorites_existing: "{{ cline_gnome_favorites_current.stdout | regex_replace('^@as ', '') | from_yaml }}"
|
||||
cline_gnome_favorites_desired: >-
|
||||
{%- set ns = namespace(apps=[]) -%}
|
||||
{%- for app in cline_gnome_favorites_existing -%}
|
||||
{%- set launcher = cline_desktop_launcher
|
||||
if app in ['ai.opencode.desktop.desktop', 'opencode-desktop.desktop'] else app -%}
|
||||
{%- if launcher != cline_desktop_launcher or launcher not in ns.apps -%}
|
||||
{%- set ns.apps = ns.apps + [launcher] -%}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
{{ ns.apps if cline_desktop_launcher in ns.apps else ns.apps + [cline_desktop_launcher] }}
|
||||
when: cline_gnome_favorites_desired != cline_gnome_favorites_existing
|
||||
changed_when: true
|
||||
@@ -288,3 +288,8 @@
|
||||
- name: Configure native VS Code
|
||||
tags: [vscode]
|
||||
ansible.builtin.import_tasks: vscode.yml
|
||||
|
||||
- name: Pin Cline Desktop in GNOME
|
||||
tags: [cline_desktop]
|
||||
ansible.builtin.import_tasks: cline_desktop.yml
|
||||
when: cline_desktop_install_enabled | default(false) | bool
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
ARG MAVEN_VERSION=3.9.16
|
||||
FROM docker.io/library/maven:${MAVEN_VERSION}-eclipse-temurin-11 AS maven
|
||||
FROM docker.io/library/node:22.23.4-bookworm-slim AS node
|
||||
# Java 21 runs the language servers only. The final image keeps Java 11 on PATH.
|
||||
FROM mcr.microsoft.com/devcontainers/java:21-bookworm AS ide
|
||||
FROM mcr.microsoft.com/devcontainers/java:11-bookworm
|
||||
USER root
|
||||
COPY --from=ide /usr/lib/jvm/msopenjdk-current/ /opt/jdk-21/
|
||||
COPY --from=maven /usr/share/maven/ /usr/share/maven/
|
||||
COPY --from=node /usr/local/bin/node /usr/local/bin/node
|
||||
COPY --from=node /usr/local/lib/node_modules/npm/ /usr/local/lib/node_modules/npm/
|
||||
RUN ln -s /usr/share/maven/bin/mvn /usr/local/bin/mvn \
|
||||
&& ln -s ../lib/node_modules/npm/bin/npm-cli.js /usr/local/bin/npm \
|
||||
&& ln -s ../lib/node_modules/npm/bin/npx-cli.js /usr/local/bin/npx \
|
||||
&& java -version \
|
||||
&& /opt/jdk-21/bin/java -version \
|
||||
&& mvn -v \
|
||||
&& npm install --global --no-audit --no-fund @anthropic-ai/claude-code@2.1.312 cline@3.0.74 \
|
||||
&& npm cache clean --force
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends bash-completion ca-certificates curl fzf git git-lfs gnupg openssh-client zoxide \
|
||||
&& arch="$(dpkg --print-architecture)" \
|
||||
&& case "$arch" in \
|
||||
amd64) sha256=ea4f0222950ee750a3d38dd80d03bce4cee07a3f63928fc47548383bcaf23093 ;; \
|
||||
arm64) sha256=0edc36cf514f1bd84becac3e94ee8ae9f8818c6a1f99f7b2ee67b362afa253d3 ;; \
|
||||
*) echo "Unsupported architecture for delta: $arch" >&2; exit 1 ;; \
|
||||
esac \
|
||||
&& curl -fsSL --retry 3 "https://github.com/dandavison/delta/releases/download/0.19.2/git-delta_0.19.2_${arch}.deb" -o /tmp/git-delta.deb \
|
||||
&& echo "$sha256 /tmp/git-delta.deb" | sha256sum -c - \
|
||||
&& apt-get install -y --no-install-recommends /tmp/git-delta.deb \
|
||||
&& rm -rf /var/lib/apt/lists/* /tmp/git-delta.deb
|
||||
COPY --chown=vscode:vscode bashrc /home/vscode/.bashrc
|
||||
USER vscode
|
||||
# Keep this file writable so VS Code can register its Git credential helper.
|
||||
RUN git config --file /home/vscode/.gitconfig include.path /run/ecaas-git/gitconfig
|
||||
@@ -0,0 +1,109 @@
|
||||
---
|
||||
- name: Refuse to deploy the ecaas workspace outside WSL
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- "'wsl2' in (ansible_facts.kernel | default('') | lower)"
|
||||
- ansible_facts.distribution | default('') == 'Fedora'
|
||||
fail_msg: Run this deployment from the Fedora WSL 2 distribution on deadalus.
|
||||
|
||||
- name: Prepare the ecaas workspace and private configuration
|
||||
vars:
|
||||
ecaas_agent_state: "{{ user_home }}/.local/state/ecaas-devcontainer"
|
||||
ecaas_git_available_cas: >-
|
||||
{{ ecaas_git_ca_probe.results | selectattr('stat.isreg', 'defined') |
|
||||
selectattr('stat.isreg') | map(attribute='item') | list }}
|
||||
ecaas_agent_config:
|
||||
- src: .claude/settings.json
|
||||
dest: claude/settings.json
|
||||
- src: .claude/CLAUDE.md
|
||||
dest: claude/CLAUDE.md
|
||||
- src: .claude/rules
|
||||
dest: claude/rules
|
||||
- src: .claude/skills
|
||||
dest: claude/skills
|
||||
- src: .config/ai/bootstrap.md
|
||||
dest: ai/bootstrap.md
|
||||
- src: .cline/data/globalState.json
|
||||
dest: cline/data/globalState.json
|
||||
- src: .cline/data/settings/global-settings.json
|
||||
dest: cline/data/settings/global-settings.json
|
||||
- src: .cline/rules
|
||||
dest: cline/rules
|
||||
- src: .cline/skills
|
||||
dest: cline/skills
|
||||
block:
|
||||
- name: Prepare the ecaas Git configuration
|
||||
ansible.builtin.import_tasks: ecaas_git.yml
|
||||
|
||||
- name: Ensure the ecaas dev container directory exists
|
||||
ansible.builtin.file:
|
||||
path: "{{ workstation_ecaas_workspace }}/.devcontainer"
|
||||
state: directory
|
||||
owner: "{{ username }}"
|
||||
group: "{{ user_group }}"
|
||||
mode: "0755"
|
||||
|
||||
- name: Ensure private ecaas agent state directories exist
|
||||
ansible.builtin.file:
|
||||
path: "{{ ecaas_agent_state }}{{ item }}"
|
||||
state: directory
|
||||
owner: "{{ username }}"
|
||||
group: "{{ user_group }}"
|
||||
mode: "0700"
|
||||
loop:
|
||||
- ""
|
||||
- /ai
|
||||
- /claude
|
||||
- /cline
|
||||
- /cline/data
|
||||
- /cline/data/settings
|
||||
|
||||
- name: Locate supported WSL agent configuration
|
||||
ansible.builtin.stat:
|
||||
path: "{{ user_home }}/{{ item.src }}"
|
||||
follow: false
|
||||
get_checksum: false
|
||||
get_mime: false
|
||||
loop: "{{ ecaas_agent_config }}"
|
||||
register: ecaas_agent_config_sources
|
||||
|
||||
- name: Seed missing private agent settings without importing credential stores
|
||||
ansible.builtin.copy:
|
||||
src: "{{ user_home }}/{{ item.item.src }}{{ '/' if item.stat.isdir | default(false) else '' }}"
|
||||
dest: "{{ ecaas_agent_state }}/{{ item.item.dest }}"
|
||||
remote_src: true
|
||||
mode: preserve
|
||||
force: false
|
||||
local_follow: false
|
||||
become_user: "{{ username }}"
|
||||
when:
|
||||
- item.stat.isreg | default(false) or item.stat.isdir | default(false)
|
||||
- not ansible_check_mode
|
||||
loop: "{{ ecaas_agent_config_sources.results }}"
|
||||
no_log: true
|
||||
diff: false
|
||||
|
||||
- name: Deploy the ecaas dev container configuration
|
||||
ansible.builtin.template:
|
||||
src: ecaas-devcontainer.json.j2
|
||||
dest: "{{ workstation_ecaas_workspace }}/.devcontainer/devcontainer.json"
|
||||
owner: "{{ username }}"
|
||||
group: "{{ user_group }}"
|
||||
mode: "0644"
|
||||
backup: true
|
||||
|
||||
- name: Deploy the ecaas dev container build files
|
||||
ansible.builtin.copy:
|
||||
src: "{{ item.src }}"
|
||||
dest: "{{ workstation_ecaas_workspace }}/.devcontainer/{{ item.dest }}"
|
||||
owner: "{{ username }}"
|
||||
group: "{{ user_group }}"
|
||||
mode: "0644"
|
||||
backup: true
|
||||
loop:
|
||||
- src: ecaas-devcontainer.Dockerfile
|
||||
dest: Dockerfile
|
||||
- src: "{{ playbook_dir }}/../dotfiles/common/.bashrc"
|
||||
dest: bashrc
|
||||
loop_control:
|
||||
label: "{{ item.dest }}"
|
||||
@@ -0,0 +1,65 @@
|
||||
---
|
||||
- name: Locate the Git CA files configured for the workstation
|
||||
ansible.builtin.stat:
|
||||
path: "{{ user_home }}/.local/share/certs/{{ item.certificate }}"
|
||||
follow: true
|
||||
get_checksum: false
|
||||
get_mime: false
|
||||
loop: "{{ workstation_git_https_cas }}"
|
||||
loop_control:
|
||||
label: "{{ item.certificate }}"
|
||||
register: ecaas_git_ca_probe
|
||||
|
||||
- name: Require the ecaas Git CA before deploying the dev container
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- workstation_ecaas_git_required_ca in (ecaas_git_available_cas | map(attribute='certificate') | list)
|
||||
fail_msg: "Install the existing workstation CA at {{ user_home }}/.local/share/certs/{{ workstation_ecaas_git_required_ca }} first."
|
||||
|
||||
- name: Verify the available Git CA files are public PEM certificates
|
||||
ansible.builtin.shell: |
|
||||
if grep -q -- 'PRIVATE KEY-----' "$ECAAS_GIT_CA"; then
|
||||
exit 1
|
||||
fi
|
||||
openssl x509 -in "$ECAAS_GIT_CA" -noout
|
||||
environment:
|
||||
ECAAS_GIT_CA: "{{ user_home }}/.local/share/certs/{{ item.item.certificate }}"
|
||||
become_user: "{{ username }}"
|
||||
check_mode: false
|
||||
changed_when: false
|
||||
when: item.stat.isreg | default(false)
|
||||
loop: "{{ ecaas_git_ca_probe.results }}"
|
||||
loop_control:
|
||||
label: "{{ item.item.certificate }}"
|
||||
|
||||
- name: Ensure the private ecaas Git configuration directory exists
|
||||
ansible.builtin.file:
|
||||
path: "{{ ecaas_agent_state }}/git"
|
||||
state: directory
|
||||
owner: "{{ username }}"
|
||||
group: "{{ user_group }}"
|
||||
mode: "0700"
|
||||
|
||||
- name: Render the workstation Git configuration for the ecaas container
|
||||
ansible.builtin.template:
|
||||
src: "{{ playbook_dir }}/templates/workstation/.gitconfig.j2"
|
||||
dest: "{{ ecaas_agent_state }}/git/gitconfig"
|
||||
owner: "{{ username }}"
|
||||
group: "{{ user_group }}"
|
||||
mode: "0600"
|
||||
vars:
|
||||
workstation_git_in_devcontainer: true
|
||||
workstation_git_container_cas: "{{ ecaas_git_available_cas }}"
|
||||
no_log: true
|
||||
diff: false
|
||||
|
||||
- name: Deploy the workstation Git ignore and delta theme files
|
||||
ansible.builtin.copy:
|
||||
src: "{{ playbook_dir }}/../dotfiles/workstation/{{ item }}"
|
||||
dest: "{{ ecaas_agent_state }}/git/{{ item }}"
|
||||
owner: "{{ username }}"
|
||||
group: "{{ user_group }}"
|
||||
mode: "0644"
|
||||
loop:
|
||||
- .gitignore_global
|
||||
- .themes.gitignore
|
||||
@@ -1,4 +1,9 @@
|
||||
---
|
||||
- name: Deploy the ecaas Java 11 dev container
|
||||
ansible.builtin.import_tasks: ecaas_devcontainer.yml
|
||||
when: workstation_ecaas_workspace is defined
|
||||
tags: [ecaas_devcontainer]
|
||||
|
||||
- name: Ensure Windows Emacs authoring directories exist
|
||||
tags: [dotfiles, dotfiles:workstation, emacs, wsl]
|
||||
ansible.builtin.file:
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
{
|
||||
"name": "ecaas — Java 11",
|
||||
"build": {
|
||||
"dockerfile": "Dockerfile",
|
||||
"args": {
|
||||
"MAVEN_VERSION": {{ workstation_mise_maven_version | to_json }}
|
||||
}
|
||||
},
|
||||
"remoteUser": "vscode",
|
||||
"updateRemoteUserUID": true,
|
||||
"containerEnv": {
|
||||
"CLAUDE_CONFIG_DIR": "/home/vscode/.claude"
|
||||
},
|
||||
"mounts": [
|
||||
{{ ('type=bind,source=' ~ ecaas_agent_state ~ '/git,target=/run/ecaas-git,readonly') | to_json }},
|
||||
{% for ca in ecaas_git_available_cas %}
|
||||
{{ ('type=bind,source=' ~ user_home ~ '/.local/share/certs/' ~ ca.certificate ~ ',target=/run/ecaas-git-ca/' ~ ca.certificate ~ ',readonly') | to_json }},
|
||||
{% endfor %}
|
||||
{{ ('type=bind,source=' ~ ecaas_agent_state ~ '/ai,target=/home/vscode/.config/ai,readonly') | to_json }},
|
||||
{{ ('type=bind,source=' ~ ecaas_agent_state ~ '/claude,target=/home/vscode/.claude') | to_json }},
|
||||
{{ ('type=bind,source=' ~ ecaas_agent_state ~ '/cline,target=/home/vscode/.cline') | to_json }}
|
||||
],
|
||||
"forwardPorts": [8080],
|
||||
"customizations": {
|
||||
"vscode": {
|
||||
"extensions": [
|
||||
"vscjava.vscode-java-pack",
|
||||
"vmware.vscode-boot-dev-pack",
|
||||
"redhat.vscode-xml",
|
||||
"redhat.vscode-yaml",
|
||||
"anthropic.claude-code",
|
||||
"saoudrizwan.claude-dev"
|
||||
],
|
||||
"settings": {
|
||||
"java.jdt.ls.java.home": "/opt/jdk-21",
|
||||
"spring-boot.ls.java.home": "/opt/jdk-21",
|
||||
"java.configuration.runtimes": [
|
||||
{
|
||||
"name": "JavaSE-11",
|
||||
"path": "/usr/lib/jvm/msopenjdk-current",
|
||||
"default": true
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -33,6 +33,19 @@
|
||||
loop_control:
|
||||
label: "{{ item.key }}"
|
||||
|
||||
- name: Reject conflicting AI desktop-app lifecycle flags
|
||||
tags: [always, ai_desktop_apps]
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- not (item.value.install_enabled | default(false)
|
||||
and item.value.uninstall_enabled | default(false) | bool)
|
||||
fail_msg: >-
|
||||
{{ item.key }} has both install_enabled and uninstall_enabled set to true.
|
||||
Choose either installation or removal before running the playbook.
|
||||
loop: "{{ ai_desktop_apps | default({}) | dict2items }}"
|
||||
loop_control:
|
||||
label: "{{ item.key }}"
|
||||
|
||||
roles:
|
||||
- role: dotfiles_common
|
||||
when:
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
{% set in_container = workstation_git_in_devcontainer | default(false) %}
|
||||
{% set git_support_dir = '/run/ecaas-git' if in_container else '~' %}
|
||||
[init]
|
||||
defaultBranch = main
|
||||
|
||||
[core]
|
||||
excludesfile = ~/.gitignore_global
|
||||
excludesfile = {{ git_support_dir }}/.gitignore_global
|
||||
pager = delta
|
||||
|
||||
[user]
|
||||
@@ -24,11 +26,21 @@
|
||||
|
||||
[merge]
|
||||
conflictstyle = diff3
|
||||
tool = bobide
|
||||
tool = {{ 'vscode' if in_container else 'bobide' }}
|
||||
|
||||
[mergetool]
|
||||
prompt = false
|
||||
|
||||
{% if in_container %}
|
||||
[mergetool "vscode"]
|
||||
cmd = code --wait --merge \"$REMOTE\" \"$LOCAL\" \"$BASE\" \"$MERGED\"
|
||||
|
||||
[diff]
|
||||
tool = vscode
|
||||
|
||||
[difftool "vscode"]
|
||||
cmd = code --wait --diff \"$LOCAL\" \"$REMOTE\"
|
||||
{% else %}
|
||||
[mergetool "bobide"]
|
||||
cmd = bobide --reuse-window --wait $MERGED
|
||||
|
||||
@@ -37,6 +49,7 @@
|
||||
|
||||
[difftool "bobide"]
|
||||
cmd = bobide --reuse-window --wait --diff $LOCAL $REMOTE
|
||||
{% endif %}
|
||||
|
||||
[color]
|
||||
ui = always
|
||||
@@ -79,7 +92,7 @@
|
||||
gcunreachablenow = gc --prune=now
|
||||
|
||||
[include]
|
||||
path = ~/.themes.gitignore
|
||||
path = {{ git_support_dir }}/.themes.gitignore
|
||||
|
||||
[delta]
|
||||
features = catppuccin-mocha navigate
|
||||
@@ -88,14 +101,16 @@
|
||||
tabs = 4
|
||||
side-by-side = true
|
||||
|
||||
[http "https://gitlab.ecaas.datacenter.comune.roma"]
|
||||
{% for ca in workstation_git_container_cas | default(workstation_git_https_cas) %}
|
||||
[http "{{ ca.url }}"]
|
||||
{% if not in_container %}
|
||||
sslBackend = openssl
|
||||
sslCAInfo = ~/.local/share/certs/ecaas.datacenter.comune.roma.crt
|
||||
|
||||
[http "https://gitlab.datacenter.comune.roma"]
|
||||
sslBackend = openssl
|
||||
sslCAInfo = ~/.local/share/certs/datacenter.comune.roma.crt
|
||||
{% endif %}
|
||||
sslCAInfo = {{ '/run/ecaas-git-ca' if in_container else '~/.local/share/certs' }}/{{ ca.certificate }}
|
||||
|
||||
{% endfor %}
|
||||
{% if not in_container %}
|
||||
[credential]
|
||||
helper = store
|
||||
{% endif %}
|
||||
|
||||
|
||||
86
docs/deadalus-ecaas-devcontainer.md
Normal file
86
docs/deadalus-ecaas-devcontainer.md
Normal file
@@ -0,0 +1,86 @@
|
||||
# ecaas Java 11 dev container on deadalus
|
||||
|
||||
From the AnsiblePlaybook checkout **in Fedora WSL 2 on deadalus**:
|
||||
|
||||
```sh
|
||||
ansible-playbook ansible/site.yml --limit deadalus --tags ecaas_devcontainer -K
|
||||
```
|
||||
|
||||
This creates `~/Work/ecaas/.devcontainer/` and deploys `devcontainer.json`,
|
||||
`Dockerfile` and `bashrc`, backing up previous versions if they change. It does
|
||||
not clone or modify application sources, change VS Code's Windows settings, or
|
||||
start Docker containers. The Docker context selection remains in the local
|
||||
WSL/VS Code setup.
|
||||
|
||||
Confirm that `docker context show` is `default` and `docker info` shows the local
|
||||
Fedora engine. Open `~/Work/ecaas` using `code .` from Fedora and select
|
||||
**Dev Containers: Reopen in Container** (or **Rebuild Container** if already open).
|
||||
Do not use the production context to build or open the workspace.
|
||||
|
||||
The container uses Java 11 for the application and Maven, and Java 21 only for
|
||||
the Java and Spring language servers. VS Code installs the Java and Spring Boot
|
||||
extension packs, XML, YAML, Claude Code and Cline inside the container. The Java
|
||||
pack includes Maven, the Java debugger and test integration. Prefer the project's
|
||||
Maven wrapper where present. Node is provided for the Claude and Cline CLIs.
|
||||
|
||||
Git is installed in the container. The image uses the repository's portable Bash
|
||||
configuration: prompt with Git status, aliases, history search, completion,
|
||||
`fzf` and `zoxide`. The image
|
||||
does not load the WSL host's Mise hook, production aliases, or Bash history.
|
||||
Run the deploy and rebuild the container to pick up changes to the shared Bash
|
||||
configuration.
|
||||
|
||||
## Git, HTTPS, and SSH
|
||||
|
||||
The image provides Git, Git LFS, delta, OpenSSH and GnuPG. It includes the
|
||||
managed workstation Git configuration from a read-only mount at runtime,
|
||||
with VS Code rather than Bob as the diff and merge tool. Git identity and
|
||||
signing configuration stay outside the workspace and image layers.
|
||||
|
||||
Before deploying, ensure the existing WSL certificate
|
||||
`~/.local/share/certs/ecaas.datacenter.comune.roma.crt` is available. The
|
||||
playbook checks and mounts that file read-only. It also mounts
|
||||
`datacenter.comune.roma.crt` from the same directory if present. These files
|
||||
are scoped to their GitLab URLs in Git; the image does not disable TLS
|
||||
verification or add the internal certificates to its global trust store.
|
||||
Recreate the container after replacing a certificate on the host.
|
||||
|
||||
Open the project from Fedora WSL so VS Code Dev Containers can reuse WSL's
|
||||
HTTPS credential helper (including an existing `.git-credentials` used by
|
||||
`credential.helper=store`) and forward the SSH agent if configured. GPG
|
||||
signing remains enabled and needs the work key available through the GPG
|
||||
agent. No credential file, SSH private key, or GPG private key is copied or
|
||||
mounted by the playbook. Do not forward a production SSH identity to this
|
||||
development workspace.
|
||||
|
||||
To verify GitLab access from the container without changing the repo, run
|
||||
`git ls-remote origin HEAD` after checking that `origin` is the expected
|
||||
GitLab repository.
|
||||
|
||||
## Agent configuration and smoke test
|
||||
|
||||
Claude and Cline seed only the supported settings, instructions, rules and
|
||||
skills present in the Fedora home into `~/.local/state/ecaas-devcontainer/`
|
||||
on the host. The initial import does not overwrite existing container settings
|
||||
or synchronize later changes back to WSL. Rules and skills imported from WSL
|
||||
must be trusted; host paths and tools referenced by them may need adaptation.
|
||||
Dedicated credential stores, provider files, VS Code global storage, and MCP
|
||||
configuration are not imported. Do not embed secrets in the settings or rules
|
||||
being imported. Sign in or configure providers inside the container when
|
||||
prompted; legacy Cline settings kept only in VS Code are not migrated.
|
||||
The state directory is private and must not be committed. Neither the Docker
|
||||
socket nor the full host home is mounted.
|
||||
|
||||
From the integrated terminal inside the Dev Container, verify:
|
||||
|
||||
```sh
|
||||
java -version
|
||||
mvn -v
|
||||
git --version
|
||||
delta --version
|
||||
claude --version
|
||||
cline --version
|
||||
```
|
||||
|
||||
Both Java and Maven should report Java 11. Run the project's Maven tests and
|
||||
check that the Spring Boot Dashboard, Java debugger and both AI panels open.
|
||||
Reference in New Issue
Block a user