Defined Type: nexus::resource::repository::raw::hosted

Defined in:
manifests/resource/repository/raw/hosted.pp

Summary

Resource to manage raw hosted repository

Overview

Examples:

nexus::resource::repository::raw::hosted { 'raw-hosted': }

Parameters:

  • ensure (Enum['present', 'absent']) (defaults to: 'present')

    Define if the resource should be created/present or deleted/absent.

  • online (Boolean) (defaults to: true)

    Whether this repository accepts incoming requests.

  • storage_blob_store_name (String[1]) (defaults to: $title)

    The name of the blobstore inside of nexus repository manager to be used. We suggest to use a own blobstore for each defined repository.

  • storage_strict_content_type_validation (Boolean) (defaults to: true)

    Whether to validate uploaded content’s MIME type appropriate for the repository format.

  • storage_write_policy (Enum['allow', 'allow_once', 'deny']) (defaults to: 'allow_once')

    Controls if deployments of and updates to assets are allowed.

  • component_proprietary_components (Boolean) (defaults to: true)

    Components in this repository count as proprietary for namespace conflict attacks (requires Sonatype Nexus Firewall).

  • content_disposition (Enum['INLINE', 'ATTACHMENT']) (defaults to: 'ATTACHMENT')

    Content Disposition

  • cleanup_policy_names (Array[String[1]]) (defaults to: [])

    Apply a list of cleanup policies to the repository. If a cleanup policy doesn’t exist, nothing happens.



25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# File 'manifests/resource/repository/raw/hosted.pp', line 25

define nexus::resource::repository::raw::hosted (
  Enum['present', 'absent'] $ensure = 'present',
  Boolean $online = true,
  String[1] $storage_blob_store_name = $title,
  Boolean $storage_strict_content_type_validation = true,
  Enum['allow', 'allow_once', 'deny'] $storage_write_policy = 'allow_once',
  Boolean $component_proprietary_components = true,
  Enum['INLINE', 'ATTACHMENT'] $content_disposition = 'ATTACHMENT',
  Array[String[1]] $cleanup_policy_names = [],
) {
  nexus_repository { $title:
    ensure     => $ensure,
    format     => 'raw',
    type       => 'hosted',
    attributes => {
      'online'    => $online,
      'storage'   => {
        'blobStoreName'               => $storage_blob_store_name,
        'strictContentTypeValidation' => $storage_strict_content_type_validation,
        'writePolicy'                 => $storage_write_policy,
      },
      'cleanup'   => {
        'policyNames' => $cleanup_policy_names,
      },
      'component' => {
        'proprietaryComponents' => $component_proprietary_components,
      },
      'raw'       => {
        'contentDisposition' => $content_disposition,
      },
    },
  }
}