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

This commit is contained in:
2026-10-20 00:17:19 +11:00
parent c402172057
commit 560c6bee91
7 changed files with 65 additions and 0 deletions
+10
View File
@@ -62,6 +62,11 @@ locals {
trimsuffix(basename(file_path), ".yaml") => content
if startswith(file_path, "remote_npm/")
}
remote_puppet = {
for file_path, content in local.all_configs :
trimsuffix(basename(file_path), ".yaml") => content
if startswith(file_path, "remote_puppet/")
}
remote_pypi = {
for file_path, content in local.all_configs :
trimsuffix(basename(file_path), ".yaml") => content
@@ -107,6 +112,11 @@ locals {
trimsuffix(basename(file_path), ".yaml") => content
if startswith(file_path, "local_ansible/")
}
local_puppet = {
for file_path, content in local.all_configs :
trimsuffix(basename(file_path), ".yaml") => content
if startswith(file_path, "local_puppet/")
}
local_gems = {
for file_path, content in local.all_configs :
trimsuffix(basename(file_path), ".yaml") => content
+1
View File
@@ -0,0 +1 @@
description: "Internal Puppet modules"
+5
View File
@@ -0,0 +1,5 @@
base_url: https://forgeapi.puppet.com
description: "forgeapi.puppet.com — public Puppet Forge modules"
immutable_ttl: 0
mutable_ttl: 300
stale_on_error: true
+5
View File
@@ -0,0 +1,5 @@
package_type: puppet
description: "Virtual Puppet Forge over internal and public modules — member order is priority order for duplicate versions"
members:
- puppet-internal
- forge
@@ -28,6 +28,7 @@ inputs = {
remote_goproxy = local.config.remote_goproxy
remote_helm = local.config.remote_helm
remote_npm = local.config.remote_npm
remote_puppet = local.config.remote_puppet
remote_pypi = local.config.remote_pypi
remote_rpm = local.config.remote_rpm
local_terraform = local.config.local_terraform
@@ -38,6 +39,7 @@ inputs = {
local_goproxy = local.config.local_goproxy
local_gems = local.config.local_gems
local_ansible = local.config.local_ansible
local_puppet = local.config.local_puppet
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_puppet" "this" {
for_each = var.remote_puppet
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_ansible" "this" {
for_each = var.remote_ansible
@@ -223,6 +236,13 @@ resource "artifactapi_local_gems" "this" {
description = each.value.description
}
resource "artifactapi_local_puppet" "this" {
for_each = var.local_puppet
name = each.key
description = each.value.description
}
resource "artifactapi_local_ansible" "this" {
for_each = var.local_ansible
+22
View File
@@ -141,6 +141,20 @@ variable "remote_npm" {
default = {}
}
variable "remote_puppet" {
description = "Map of Puppet Forge 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_ansible" {
description = "Map of Ansible Galaxy remote repositories"
type = map(object({
@@ -231,6 +245,14 @@ variable "local_gems" {
default = {}
}
variable "local_puppet" {
description = "Map of local Puppet Forge repositories"
type = map(object({
description = optional(string, "")
}))
default = {}
}
variable "local_ansible" {
description = "Map of local Ansible Galaxy repositories"
type = map(object({