No description
Find a file
2021-09-07 21:25:42 +02:00
.gitignore Initial commit 2019-10-20 21:06:06 +02:00
creds.py.template Initial commit 2019-10-20 21:06:06 +02:00
creds_env.py modify creds to handle env data 2020-01-02 03:32:30 +01:00
hosts.py always use v4 for ansible_host, because awx sucks 2021-03-13 18:23:06 +01:00
inventory.py add zone information 2021-08-23 17:51:21 +02:00
main.py fix interpreter path 2021-09-07 21:25:42 +02:00
README.md added README 2019-10-28 02:23:11 +01:00
service.py changed the service exporter to complete host_firewall_conf 2021-08-23 02:28:15 +02:00

Netbox to Ansible Script

This is a simple script to pull all info from a netbox instance and export it to a json format that can be used from ansible. Host will be grouped by role and all fields from netbox will be availible as hostvars, including all interfaces with corresponding ips.

Usage

  1. Copy creds.py.template to creds.py and fill in token and netbox url.
  2. Start ansible and specify main.py as the inventory file.