lae.netbox
Here's the simplified translation of the text:
Role Information
- Author: lae
- Role Name: netbox
- Role: lae.netbox
- GitHub Name: lae/ansible-role-netbox
- NetBox Version: 3.7.3
This role installs and sets up NetBox, which is a tool for managing IP addresses (IPAM) and data center infrastructure (DCIM).
Purpose of This Role:
- Deploys NetBox in its own virtual environment.
- Can install it from a release file or via Git using uWSGI as the server.
Supported Systems:
- CentOS 7, 8
- RHEL 9
- Debian 9, 10, 11, 12
- Ubuntu 16, 18, 20, 22
Main Differences from Official Installation:
- Uses systemd instead of supervisord.
- Uses uWSGI instead of gunicorn.
- Sets up the NetBox/uWSGI service securely.
- Can reload configurations without restarting.
Quick Start Guide
If you have Ansible set up:
ansible-galaxy install geerlingguy.postgresql davidwittman.redis lae.netbox
ansible-galaxy collection install community.postgresql
ansible-playbook -i your.server.fqdn, ~/.ansible/roles/lae.netbox/examples/playbook_single_host_deploy.yml -K
This command will install NetBox and PostgreSQL on your server, which will be reachable on port 80.
Using Vagrant: If you prefer Vagrant, run:
ansible-galaxy install geerlingguy.postgresql davidwittman.redis lae.netbox
ansible-galaxy collection install community.postgresql
cd ~/.ansible/roles/lae.netbox/
vagrant up
Support and Contributions
If you wish to contribute, please read the DEVELOPING.md
for guidelines on setting up a development environment.
If you need help or want to collaborate, feel free to join my Discord server: link
Prerequisites
PostgreSQL: This role will not install PostgreSQL but can create a database if needed. You must set up a PostgreSQL server and user separately. Check the Example Playbook section for guidance.
Also, for Ansible 2.10 and later, you might need to include the community.postgresql
collection in your playbook's requirements.yml
:
---
collections:
- name: community.postgresql
version: 3.4.0
Redis:
This role does not manage a Redis instance. You’ll need to either install redis-server
yourself or use a Redis role.
Important Role Variables
- netbox_stable: Must be set to
true
for the role to work. - Superuser Info: You can set up a local superuser account. Remember to set a password if you enable it.
Other configurable variables include database settings and various NetBox configurations. Make sure to explore all options and examples provided in the role.
Example Playbook
This example shows how to set up NetBox with PostgreSQL and Redis:
- hosts: your.server
become: yes
roles:
- geerlingguy.postgresql
- davidwittman.redis
- lae.netbox
vars:
netbox_stable: true
netbox_socket: "0.0.0.0:80"
# Other variables...
Troubleshooting
If you encounter issues with TCP connections, try adjusting the netbox_protocol
or netbox_uwsgi_options
settings as described in the original document.
This translation keeps the message simple while maintaining key information about the installation and configuration of the NetBox role in Ansible.
Installs and configures NetBox, a DCIM suite, in a production setting.
ansible-galaxy install lae.netbox