Git Product home page Git Product logo

ansible-role-netbox's Introduction

CI Ansible Galaxy

Ansible Role: NetBox

An Ansible Role that installs on Debian/Ubuntu.

This role install all dependencies required by NetBox including the PostgreSQL database. So it can be used to setup a NetBox appliance including everything in the same machine.

Web backend and frontend setups can be disabled if you already have your own way to handle them.

Dependencies

None.

Roles Variables

Available variables are listed below, along with default values:

Setup for the PostgreSQL database:

netbox_database: netbox
netbox_database_user: netbox
netbox_database_password: netbox
netbox_database_host: localhost # This will force PostgreSQL to be setup

Where to get NetBox and which version:

netbox_version: v3.4.6
netbox_git_url: https://github.com/netbox-community/netbox.git

Where to install NetBox:

netbox_install_directory: /opt/netbox

The username, password and email for the super user.

netbox_superuser_username: admin
netbox_superuser_password: admin
netbox_superuser_email: [email protected]

LDAP can be used as authentication mechanism. It must be enabled, and the whole LDAP configuration has to be provided in the following variables (see NetBox documentation):

netbox_setup_ldap_auth: false
netbox_ldap_config: ""

Other Python packages can be installed using local_requirements.txt, this is useful to install packages such as NAPALM or plugins:

netbox_local_requirements:
  - napalm
  …

The configuration for NetBox must be given as key: value pairs like the following, please note that the secret key does not need to be given as it will be generated automatically:

netbox_config:
  ALLOWED_HOSTS:
    - localhost
    - 127.0.0.1
  TIME_ZONE: "Europe/Paris"
  …

Housekeeping to clear expired sessions and remove old changelog entries can be configured with the following variables:

netbox_housekeeping: true
netbox_housekeeping_hour: 4
netbox_housekeeping_minute: 30

Configuration for the backend web server and systemd:

netbox_setup_systemd: false
netbox_gunicorn_address: 127.0.0.1
netbox_gunicorn_port: 8001
netbox_gunicorn_workers_number: 5

Whether or not to configure the frontend web server:

netbox_setup_web_frontend: false

Example Playbook

- hosts: netboxes
  roles:
    - { role: gmazoyer.netbox }

License

This Ansible Role is released under the terms of the GNU GPLv3. Please read the LICENSE file for more information.

Portions of this role include MIT-licensed code (see 7c400dd) and are demarcated in the header. See LICENSE-MIT for more information.

Author Information

This role was created in 2017 by Guillaume Mazoyer.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.