Cleanup Policies

⚠️
The cleanup policies API endpoint is a Pro feature!
Role Default
nexus_repos_cleanup_policies: []
group_vars/all.yml
nexus_repos_cleanup_policies:
- name: maven_releases
  format: maven2
  notes: "maven RELEASES"
  criteriaLastBlobUpdated: 60
  criteriaLastDownloaded: 120
  criteriaReleaseType: RELEASES
  criteriaAssetRegex: "your-regex*"
group_vars/all.yml
nexus_repos_cleanup_policies:
- name: maven_releases
  format: maven2
  notes: "maven SNAPSHOTS"
  criteria:
    lastBlobUpdated: 60
    lastDownloaded: 120
    preRelease: RELEASES
    regexKey: "your-regex*"
group_vars/all.yml
nexus_repos_cleanup_policies:
# You can use both formats

# nexus_oss format
- name: maven_releases
  format: maven2
  notes: "maven SNAPSHOTS"
  criteria:
    lastBlobUpdated: 60
    lastDownloaded: 120
    preRelease: RELEASES
    regexKey: "your-regex*"

# config_api format
- name: maven_snapshots
  format: maven2
  notes: "maven SNAPSHOTS"
  criteriaLastBlobUpdated: 60
  criteriaLastDownloaded: 120
  criteriaReleaseType: SNAPSHOTS
  criteriaAssetRegex: "your-regex*"

Cleanup policies definitions. Can be added to repo definitions with either the cleanup_policies or cleanup.policyNames attribute. See repositories for examples.

Last updated on