You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
hetzner-ansible/roles/harbor_config/tasks/configure_scanall_schedule.yml

30 lines
922 B
YAML

---
- name: "configure | configure scanall schedule | CREATE scanschedule"
uri:
url: "{{ shared_service_url_harbor }}/api/v2.0/system/scanAll/schedule"
user: '{{ harbor_admin_username }}'
password: '{{ harbor_admin_password }}'
method: POST
body_format: json
force_basic_auth: yes
headers:
Content-Type: application/json
body: '{{ scanschedule |to_json }}'
status_code: [201,412]
register: create_scanschedule
- name: "configure | configure scanall schedule | UPDATE scanschedule"
uri:
url: "{{ shared_service_url_harbor }}/api/v2.0/system/scanAll/schedule"
user: '{{ harbor_admin_username }}'
password: '{{ harbor_admin_password }}'
method: PUT
body_format: json
force_basic_auth: yes
headers:
Content-Type: application/json
body: '{{ scanschedule |to_json }}'
status_code: [200]
when:
- create_scanschedule.status in [412]