oci-registry-prune: Add staging environment to the playbook
Signed-off-by: Clement Verna <cverna@tutanota.com>
This commit is contained in:
parent
9bda00c548
commit
5acaa0fbc5
1 changed files with 15 additions and 1 deletions
|
@ -4,7 +4,7 @@
|
|||
# registry hosts.
|
||||
|
||||
- name: Prune 30 days old OCI images from candidate-registry
|
||||
hosts: oci-candidate-registry01.phx2.fedoraproject.org
|
||||
hosts: oci-candidate-registry01.phx2.fedoraproject.org:oci-candidate-registry01.stg.phx2.fedoraproject.org
|
||||
gather_facts: false
|
||||
user: root
|
||||
|
||||
|
@ -22,7 +22,21 @@
|
|||
username: "{{candidate_registry_osbs_prod_username}}"
|
||||
password: "{{candidate_registry_osbs_prod_password}}"
|
||||
delegate_to: compose-x86-01.phx2.fedoraproject.org
|
||||
when: env == "production"
|
||||
|
||||
- name: Run registry garbage collection to reclaim disk space
|
||||
command: "registry garbage-collect /etc/docker-distribution/registry/config.yml"
|
||||
when: env == "production"
|
||||
|
||||
- name: Find and Delete 30 days old OCI images (stg)
|
||||
delete_old_oci_images:
|
||||
registry: "https://candidate-registry.stg.fedoraproject.org"
|
||||
days: 30
|
||||
username: "{{candidate_registry_osbs_stg_username}}"
|
||||
password: "{{candidate_registry_osbs_stg_password}}"
|
||||
delegate_to: compose-x86-01.phx2.fedoraproject.org
|
||||
when: env == "staging"
|
||||
|
||||
- name: Run registry garbage collection to reclaim disk space (stg)
|
||||
command: "registry garbage-collect /etc/docker-distribution/registry/config.yml"
|
||||
when: env == "staging"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue