remove auto_approval; add hub_approval_nvme.yml
This commit is contained in:
parent
6b09d816e7
commit
d5a569727d
@ -24,7 +24,6 @@
|
|||||||
path : "files/chhammer-known_good-1.0.2.tar.gz"
|
path : "files/chhammer-known_good-1.0.2.tar.gz"
|
||||||
namespace : "{{ __pah_namespace }}"
|
namespace : "{{ __pah_namespace }}"
|
||||||
name : known_good
|
name : known_good
|
||||||
auto_approve : false
|
|
||||||
|
|
||||||
# Example with `auto_approve` set to `false`:
|
# Example with `auto_approve` set to `false`:
|
||||||
#############################################
|
#############################################
|
||||||
|
71
hub_approval_nvme.yml
Normal file
71
hub_approval_nvme.yml
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
- name: Test collection upload and approval
|
||||||
|
hosts: localhost
|
||||||
|
connection: local
|
||||||
|
become: false
|
||||||
|
gather_facts: false
|
||||||
|
|
||||||
|
|
||||||
|
vars:
|
||||||
|
__pah_host : 10.1.1.66
|
||||||
|
__pah_token : e2d83184f03e52bb96c3620d2a5379ce7a4cce8e
|
||||||
|
__pah_namespace : chhammer
|
||||||
|
__pause_seconds : 10
|
||||||
|
|
||||||
|
|
||||||
|
tasks:
|
||||||
|
- name: Upload known_good collection into Private Automation Hub
|
||||||
|
# Using `ah_collection` for uploading collections will default
|
||||||
|
# to auto-approving the collection. You must set `auto_approve: False`
|
||||||
|
# in order to hold collection for approval review
|
||||||
|
infra.ah_configuration.ah_collection:
|
||||||
|
validate_certs : false
|
||||||
|
ah_host : "{{ __pah_host }}"
|
||||||
|
ah_token : "{{ __pah_token }}"
|
||||||
|
path : "files/chhammer-known_good-1.0.2.tar.gz"
|
||||||
|
namespace : "{{ __pah_namespace }}"
|
||||||
|
name : known_good
|
||||||
|
|
||||||
|
# Example with `auto_approve` set to `false`:
|
||||||
|
#############################################
|
||||||
|
# - name: Upload known_bad collection into Private Automation Hub
|
||||||
|
# infra.ah_configuration.ah_collection:
|
||||||
|
# validate_certs : false
|
||||||
|
# ah_host : "{{ __pah_host }}"
|
||||||
|
# ah_token : "{{ __pah_token }}"
|
||||||
|
# path : "files/chhammer-known_bad-1.0.2.tar.gz"
|
||||||
|
# namespace : "{{ __pah_namespace }}"
|
||||||
|
# name : known_bad
|
||||||
|
# auto_approve : false
|
||||||
|
|
||||||
|
|
||||||
|
# Using `ah_collection_upload` for uploading collections will not
|
||||||
|
# auto-approve collections, likewise, there are no parameters for managing
|
||||||
|
# approval state via this module.
|
||||||
|
#
|
||||||
|
# Also, this does not seem to be idempotent like `ah_collection` module,
|
||||||
|
# hence the ignore errors. If the collection is already present or awaiting
|
||||||
|
# approval, this will return an error.
|
||||||
|
- name: Upload known_bad collection into Private Automation Hub
|
||||||
|
infra.ah_configuration.ah_collection_upload:
|
||||||
|
validate_certs : false
|
||||||
|
ah_host : "{{ __pah_host }}"
|
||||||
|
ah_token : "{{ __pah_token }}"
|
||||||
|
path : "files/chhammer-known_bad-1.0.2.tar.gz"
|
||||||
|
ignore_errors: true
|
||||||
|
|
||||||
|
|
||||||
|
- name: After a delay approve the known_bad collection
|
||||||
|
block:
|
||||||
|
- name: Create a delay to verify uploaded collection is waiting for approval
|
||||||
|
ansible.builtin.pause:
|
||||||
|
seconds: "{{ __pause_seconds }}"
|
||||||
|
|
||||||
|
# Must provide namespace/name/version in order to approve a collection:
|
||||||
|
- name: Approve the known_bad collection
|
||||||
|
infra.ah_configuration.ah_approval:
|
||||||
|
validate_certs : false
|
||||||
|
ah_host : "{{ __pah_host }}"
|
||||||
|
ah_token : "{{ __pah_token }}"
|
||||||
|
namespace : "{{ __pah_namespace }}"
|
||||||
|
name : known_bad
|
||||||
|
version : 1.0.2
|
Loading…
x
Reference in New Issue
Block a user