install dependency-check script using this Ansible role (I have used it for jenkins master and slave). It will simply install dependency-check shell script in /opt directory
roles/owasp-check-install/defaults/main.yml:
---
dependency_check_version: 5.1.1
roles/owasp-check-install/tasks/main.yml
---
- name: Delete previously unpacked /opt/dependency-check
file:
path: /opt/dependency-check
state: absent
become: yes
- name: "Download dependency-check-{{ dependency_check_version }}-release.zip"
get_url:
url: "https://dl.bintray.com/jeremy-long/owasp/dependency-check-{{ dependency_check_version }}-release.zip"
dest: /opt/dc.zip
become: yes
- name: Extract dc.zip into /opt/dependency-check
unarchive:
src: /opt/dc.zip
dest: /opt
remote_src: yes
become: yes
- name: Recursively change ownership of a directory /opt/dependency-check
file:
path: /opt/dependency-check
state: directory
recurse: yes
owner: jenkins
group: jenkins
become: yes