mirror of
https://scm.tikali.ai/tikali/applications/monky/monky-deployd.git
synced 2026-09-18 05:36:15 +00:00
feat(install): read-only deploy token for the private package registry (v0.1.2)
The GitLab project is private (its parent groups are private, so it cannot be made public): the v0.1.1 one-liner answered 401 anonymously. install.sh gains --token / MONKY_DEPLOYD_TOKEN and sends `DEPLOY-TOKEN: <token>` (a GitLab deploy token, scope read_package_registry only, revocable) on every registry download, the script itself included; the token goes through a 0600 curl -K file (never the command line, the log or an xtrace). The grant is taken via --bootstrap-file when the script is piped (stdin IS the script). Ansible: monky_deployd_download_token (vaulted) -> DEPLOY-TOKEN header, no_log. Docs explain why, the token's scope and the --source gitea alternative (split-horizon Gitea, cbs/iac#102). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KLB7jieMNRkTsJ2epr4Ds1
This commit is contained in:
@@ -22,20 +22,26 @@
|
||||
changed_when: false
|
||||
failed_when: false
|
||||
|
||||
# The registry is PRIVATE: both fetches send `DEPLOY-TOKEN: {{ monky_deployd_download_token }}`
|
||||
# (read_package_registry only) and run no_log so the header never reaches the play output.
|
||||
- name: monky_deployd | download .deb + sha256 from the scm.tikali.ai package registry
|
||||
when: monky_deployd_installed.stdout != monky_deployd_version
|
||||
block:
|
||||
- name: monky_deployd | fetch sha256
|
||||
ansible.builtin.uri:
|
||||
url: "{{ monky_deployd_deb_sha256_url }}"
|
||||
headers: "{{ monky_deployd_download_headers }}"
|
||||
return_content: true
|
||||
register: monky_deployd_sha
|
||||
no_log: true
|
||||
- name: monky_deployd | fetch .deb (checksum verified)
|
||||
ansible.builtin.get_url:
|
||||
url: "{{ monky_deployd_deb_url }}"
|
||||
headers: "{{ monky_deployd_download_headers }}"
|
||||
dest: "/var/cache/apt/archives/{{ monky_deployd_deb }}"
|
||||
checksum: "sha256:{{ monky_deployd_sha.content.split()[0] }}"
|
||||
mode: "0644"
|
||||
no_log: true
|
||||
- name: monky_deployd | install .deb
|
||||
ansible.builtin.apt:
|
||||
deb: "/var/cache/apt/archives/{{ monky_deployd_deb }}"
|
||||
|
||||
Reference in New Issue
Block a user