Add local ansible Galaxy repositories
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful

This commit is contained in:
2026-10-18 03:37:52 +11:00
parent f4d3093952
commit ba8d3a3c39
11 changed files with 1149 additions and 3 deletions
+13 -1
View File
@@ -2,7 +2,19 @@ import type { PackageTypeUI } from '../types';
const def: PackageTypeUI = {
color: 'red',
snippets: ({ proxy }) => {
snippets: ({ name, url, proxy, isLocal }) => {
if (isLocal) {
const src = `${url}/api/v1/local/${name}/`;
return [
{
title: 'Publish and install',
language: 'bash',
code: `ansible-galaxy collection publish <ns>-<name>-<version>.tar.gz --server ${src} --api-key unused
ansible-galaxy collection install <ns>.<name> --server ${src}`,
note: 'publish needs an API key; any value works. Publishing an existing version is rejected.',
},
];
}
return [
{
title: 'Install collections through this Galaxy proxy',