mirror of
https://github.com/fscotto/infra.git
synced 2026-11-25 21:29:51 +00:00
43 lines
1.5 KiB
YAML
43 lines
1.5 KiB
YAML
---
|
|
- 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'] }}."
|
|
|
|
- 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: 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: 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:
|
|
- ansible_check_mode
|
|
- not cline_desktop_rpm_cache.stat.exists
|