Permalink
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
25 lines (22 sloc) 794 Bytes
---
- name: Removing (potential) previously declared Groovy script {{ item }}
uri:
url: "http://localhost:{{ nexus_default_port }}{{ nexus_default_context_path }}service/siesta/rest/v1/script/{{ item }}"
user: 'admin'
password: "{{ current_nexus_admin_password }}"
method: DELETE
force_basic_auth: yes
status_code: 204,404
- name: Declaring Groovy script {{ item }}
uri:
url: "http://localhost:{{ nexus_default_port }}{{ nexus_default_context_path }}service/siesta/rest/v1/script"
user: 'admin'
password: "{{ current_nexus_admin_password }}"
body_format: json
method: POST
force_basic_auth: yes
status_code: 204
body:
name: "{{ item }}"
type: 'groovy'
content: "{{ lookup('file', 'groovy/' + item + '.groovy') }}"