Adding role for dhcptest

This commit is contained in:
Michael Pellegrino
2021-10-15 17:23:06 +00:00
parent e3270b7cb7
commit 38062910eb
2 changed files with 49 additions and 0 deletions

View File

@@ -0,0 +1,40 @@
---
- name: install dependencies
become: yes
apt:
name: "{{ item }}"
update_cache: yes
with_items:
- default-d-compiler
- build-essential
- name: Downloading dhcptest sources
git:
clone: yes
repo: "{{ dhcptest_url }}"
dest: "/tmp/dhcptest"
register: dhcptest_source
- name: Building NGINX
become: yes
shell: ldc2 dhcptest.d
args:
chdir: "{{ dhcptest_build_dir }}"
when: dhcptest_source
register: build_dhcptest
- name: Installing dhcptest
become: yes
copy:
src: "{{ dhcptest_build_dir }}/dhcptest"
dest: "{{ dhcptest_bin_path }}"
owner: root
group: root
mode: 0755
when: build_dhcptest

View File

@@ -0,0 +1,9 @@
---
dhcptest_url: "https://github.com/CyberShadow/dhcptest.git"
dhcptest_bin_path: "/usr/sbin/dhcptest"
dhcptest_build_dir: "/tmp/dhcptest"