gmazoyer / ansible-role-netbox Goto Github PK
View Code? Open in Web Editor NEWAnsible Role: NetBox
License: GNU General Public License v3.0
Ansible Role: NetBox
License: GNU General Public License v3.0
When testing this role, the Travis CI test hangs for Ubuntu 18.04.
It always stay at the same step: ensure postgresql is started
I was unable to reproduce this issue on my machine (macOS) with the same Docker container.
This means that the CI build cannot be properly run.
Hi,
i'm getting the error
TASK [respawner.netbox : create postgresql database] ************************************************************************************************************************************************
fatal: [nit-net-01]: FAILED! => {"changed": false, "msg": "Failed to import the required Python library (psycopg2) on nit-net-01's Python /usr/bin/python3.8. Please read module documentation and install in the appropriate location. If the required library is installed, but Ansible is using the wrong Python interpreter, please consult the documentation on ansible_python_interpreter"}
Want to install netbox on a fresh ubuntu 18.04 vm.
thanks in advance
Hi,
On a simple run (calling the role with no option) I get this error:
TASK [netbox : create postgresql database] *************************************************************************************************************************************************
fatal: [ec2-myinstance.eu-west-2.compute.amazonaws.com]: FAILED! => {"msg": "Failed to change ownership of the temporary files Ansible needs to create despite connecting as a privileged user. Unprivileged become user would be unable to read the file."}
I think this is related to an open issue in ansible, not your role directly, I open the issue to trace it because you could encounter it too.
Here is the thread on the ansible side: ansible/ansible#16052 (comment)
We like to add the variable netbox_login_required to change the netbox parameter LOGIN_REQUIRED in this role
Hi Guilliaume,
I notice that in 7c400dd there are significant portions of code that appear to be copied from my project. I'm glad to have been a good resource, especially since this role is more inline with how the upstream NetBox documentation details installation procedures. Thanks!
This was probably an oversight, but I noticed that it was missing a copy of the license from the original project, which is a requirement for redistribution/modification:
https://github.com/lae/ansible-role-netbox/blob/master/LICENSE
Since this repository is originally under GPL, there are two steps that need to be taken to resolve this:
LICENSE
linked above would suffice as a comment. You should also include a line referencing the GPL if there are significant portions that don't fall under the MIT license. I believe the following files are candidates:tasks/install_packages.yml
tasks/setup_netbox.yml
templates/configuration.py.j2
vars/main.yml
Basically, this doesn't result in any change of permissions granted for this repository (as GPL is more or less a superset of MIT), but rather a change of attribution.
If you want to make those changes, that'd be great. Otherwise, I can submit a pull request myself. Also, sorry if I sound heavy-handed, I'm trying my best not to, but I poured a lot of time into this project and believe integrity is pretty important in these sorts of situations.
I don't know if it's intentional or if the access management rules have changed in the meantime but I was forced to set become: true to all the tasks present in tasks/setup_web_frontend.yml
I'm on debian 12
We should consider dropping Python 2 support soon and move to Python 3.
Netbox will require this in the next release (see netbox-community/netbox#2000).
Hi mate use your role quite a lot in lab and prod due to its high quality.
On Ubuntu 22 I had to do the following to make it pass on Ubuntu 22
In gmazoyer.netbox/vars/
Had to create a file called ubuntu-22.yml that I copied from ubuntu.yml in /.ansible/roles/gmazoyer.netbox/vars directory
ubuntu-22.yml
Changed the following vars due to python changes and package name changes or version changes
__netbox_python_packages:
- python3.10 # Changed from python3.8
- python3.10-dev # Changed from python3.8-dev
__netbox_web_frontend_packages:
- libapache2-mod-wsgi-py3 #Changed from libapache2-mod-wsgi
netbox_python_binary: /usr/bin/python3.10
LDAP authentication test has been disabled recently (since LDAP config changes in 2.6.0).
Figure out the new config to setup to re-enable the LDAP test.
It could be useful for some users to setup NetBox in a virtualenv to avoid messing around with the dependencies. This can be implemented using a variable like netbox_use_virtualenv
that can be either set to true
or false
.
LDAP auth has been moved to the authentication module and configuration must be changed based on it.
Hello,
It would be nice if we also could configure LDAP with this role.
I see that parameter netbox_setup_ldap_auth: false is configured by default
as an engineer using this ansible role to deploy a netbox instance, I would like to be able to configure netbox to use SSL using variables, without having to use a separate role to manage apache, and in the same way that I am able to configure SSL in other roles that include an apache web frontend (for example zabbix)
The following step appears to be failing on existing installation, not new ones though.
- name: build documentation
ansible.builtin.command: "{{ netbox_virtualenv_path }}/bin/mkdocs build"
args:
chdir: "{{ netbox_install_directory }}"
become: true
become_user: "{{ netbox_user }}"
The error is the following:
INFO - Cleaning site directory
INFO - Building documentation to directory: /opt/netbox/netbox/project-static/docs
INFO - The following pages exist in the docs directory, but are not included in the "nav" configuration:
- index.md
/opt/netbox/venv/lib/python3.9/site-packages/mkdocstrings/handlers/python/__init__.py:13: UserWarning: The 'python-legacy' extra of mkdocstrings will become mandatory in the next release. We have no way to detect if you already specify it, so if you do, please ignore this warning. You can globally disable it with the PYTHONWARNINGS environment variable: PYTHONWARNINGS=ignore::UserWarning:mkdocstrings.handlers.python
warnings.warn(
ERROR - mkdocstrings: __init__() got an unexpected keyword argument 'heading_level'
Traceback (most recent call last):
File "/opt/netbox/venv/lib/python3.9/site-packages/pytkdocs/cli.py", line 205, in main
output = json.dumps(process_json(line))
File "/opt/netbox/venv/lib/python3.9/site-packages/pytkdocs/cli.py", line 114, in process_json
return process_config(json.loads(json_input))
File "/opt/netbox/venv/lib/python3.9/site-packages/pytkdocs/cli.py", line 89, in process_config
loader = Loader(**obj_config)
TypeError: __init__() got an unexpected keyword argument 'heading_level'
ERROR - Error reading page 'plugins/development/forms.md':
ERROR - Could not collect 'utilities.forms.ColorField'
Aborted with a BuildError!
When installing using the latest release the following options seemed to be ignored:
netbox_web_tls: false
netbox_web_tls_port: 443
it seems that it's mentioned in the documentaiton, but the commit is not present in the latest version.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.