Initial work on netbox role
Change-Id: I8e51dc7d5f21d3c83b3d8ab3955467c6069c7c74
diff --git a/tasks/Debian.yml b/tasks/Debian.yml
new file mode 100644
index 0000000..dc1f461
--- /dev/null
+++ b/tasks/Debian.yml
@@ -0,0 +1,36 @@
+---
+# netbox tasks/Debian.yml
+#
+# SPDX-FileCopyrightText: © 2020 Open Networking Foundation <support@opennetworking.org>
+# SPDX-License-Identifier: Apache-2.0
+
+# prereqs given here:
+# https://netbox.readthedocs.io/en/stable/installation/3-netbox/#install-system-packages
+- name: Install NetBox Prereqs
+ apt:
+ name:
+ - "python3"
+ - "python3-pip"
+ - "python3-venv"
+ - "python3-dev"
+ - "build-essential"
+ - "libxml2-dev"
+ - "libxslt1-dev"
+ - "libffi-dev"
+ - "libpq-dev"
+ - "libssl-dev"
+ - "zlib1g-dev"
+ state: "present"
+ update_cache: true
+ cache_valid_time: 3600
+
+- name: Create systemd service unit files for NetBox services
+ template:
+ src: "{{ item }}.j2"
+ dest: "/etc/systemd/system/{{ item }}"
+ owner: "root"
+ group: "root"
+ mode: "0644"
+ with_items:
+ - "netbox.service"
+ - "netbox-rq.service"