Add ansible remote, local and virtual
ci/woodpecker/pr/plan Pipeline failed
ci/woodpecker/pr/pre-commit Pipeline failed

This commit is contained in:
2026-10-18 03:46:34 +11:00
parent acf0309ddf
commit 53407489a8
7 changed files with 65 additions and 0 deletions
+10
View File
@@ -12,6 +12,11 @@ locals {
trimsuffix(basename(file_path), ".yaml") => content
if startswith(file_path, "remote_alpine/")
}
remote_ansible = {
for file_path, content in local.all_configs :
trimsuffix(basename(file_path), ".yaml") => content
if startswith(file_path, "remote_ansible/")
}
remote_cargo = {
for file_path, content in local.all_configs :
trimsuffix(basename(file_path), ".yaml") => content
@@ -92,6 +97,11 @@ locals {
trimsuffix(basename(file_path), ".yaml") => content
if startswith(file_path, "local_npm/")
}
local_ansible = {
for file_path, content in local.all_configs :
trimsuffix(basename(file_path), ".yaml") => content
if startswith(file_path, "local_ansible/")
}
local_gems = {
for file_path, content in local.all_configs :
trimsuffix(basename(file_path), ".yaml") => content
@@ -0,0 +1 @@
description: "Internal Ansible collections"
+5
View File
@@ -0,0 +1,5 @@
base_url: https://galaxy.ansible.com
description: "galaxy.ansible.com — public Ansible Galaxy collections"
immutable_ttl: 0
mutable_ttl: 300
stale_on_error: true
+5
View File
@@ -0,0 +1,5 @@
package_type: ansible
description: "Virtual Ansible Galaxy over internal and public collections — member order is priority order for duplicate versions"
members:
- ansible-internal
- galaxy
@@ -18,6 +18,7 @@ terraform {
inputs = {
remote_alpine = local.config.remote_alpine
remote_ansible = local.config.remote_ansible
remote_cargo = local.config.remote_cargo
remote_docker = local.config.remote_docker
remote_generic = local.config.remote_generic
@@ -35,6 +36,7 @@ inputs = {
local_helm = local.config.local_helm
local_npm = local.config.local_npm
local_gems = local.config.local_gems
local_ansible = local.config.local_ansible
local_docker = local.config.local_docker
local_generic = local.config.local_generic
virtual = local.config.virtual
+20
View File
@@ -135,6 +135,19 @@ resource "artifactapi_remote_npm" "this" {
stale_on_error = each.value.stale_on_error
}
resource "artifactapi_remote_ansible" "this" {
for_each = var.remote_ansible
name = each.key
base_url = each.value.base_url
description = each.value.description
immutable_ttl = each.value.immutable_ttl
mutable_ttl = each.value.mutable_ttl
patterns = each.value.patterns
mutable_patterns = each.value.mutable_patterns
stale_on_error = each.value.stale_on_error
}
resource "artifactapi_remote_gems" "this" {
for_each = var.remote_gems
@@ -203,6 +216,13 @@ resource "artifactapi_local_gems" "this" {
description = each.value.description
}
resource "artifactapi_local_ansible" "this" {
for_each = var.local_ansible
name = each.key
description = each.value.description
}
resource "artifactapi_local_docker" "this" {
for_each = var.local_docker
+22
View File
@@ -141,6 +141,20 @@ variable "remote_npm" {
default = {}
}
variable "remote_ansible" {
description = "Map of Ansible Galaxy remote repositories"
type = map(object({
base_url = string
description = optional(string, "")
immutable_ttl = optional(number, 0)
mutable_ttl = optional(number, 3600)
patterns = optional(list(string), [])
mutable_patterns = optional(list(string), [])
stale_on_error = optional(bool, true)
}))
default = {}
}
variable "remote_gems" {
description = "Map of RubyGems remote repositories"
type = map(object({
@@ -209,6 +223,14 @@ variable "local_gems" {
default = {}
}
variable "local_ansible" {
description = "Map of local Ansible Galaxy repositories"
type = map(object({
description = optional(string, "")
}))
default = {}
}
variable "local_generic" {
description = "Map of local generic (raw-file) repositories"
type = map(object({