-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update workflows and documentation for Debian support (#30)
* add Debian checks to GitHub workflows * remove checks for NetBox sub-point releases, keep last major/minor releases * update README for Debian support and fix syntax highlighting
- Loading branch information
Showing
5 changed files
with
83 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -63,6 +63,7 @@ jobs: | |
distro: | ||
- amazonlinux2 | ||
- centos8 | ||
- debian11 | ||
- rockylinux8 | ||
- ubuntu2004 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,53 +12,57 @@ At the completion of this play netbox will be available at: `http://<host_ip>:80 | |
|
||
## Host variables | ||
|
||
# netbox.example.com.yml | ||
|
||
netbox_home: /opt/netbox | ||
netbox_version_tag: v3.0.9 | ||
netbox_db_username: netbox | ||
netbox_db_password: password | ||
netbox_secret_key: "-nit@y=2#)u2dz-e(de1$t*4mxpy4d9o(b4j5xf@6!ql=r-14o" | ||
|
||
netbox_superusers: | ||
- username: admin | ||
password: admin | ||
email: [email protected] | ||
|
||
# caddy_ansible.caddy_ansible configuration | ||
caddy_config: | | ||
:8080 { | ||
route /static* { | ||
uri strip_prefix /static | ||
root * /opt/netbox/current/netbox/static | ||
file_server | ||
} | ||
|
||
reverse_proxy http://127.0.0.1:8001 | ||
} | ||
|
||
# geerlingguy.postgresql configuration | ||
postgresql_users: | ||
- name: "{{ netbox_db_username }}" | ||
password: "{{ netbox_db_password }}" | ||
db: "{{ netbox_db_name }}" | ||
postgresql_databases: | ||
- name: "{{ netbox_db_name }}" | ||
owner: "{{ netbox_db_username }}" | ||
```yaml | ||
# netbox.example.com.yml | ||
|
||
netbox_home: /opt/netbox | ||
netbox_version_tag: v3.0.9 | ||
netbox_db_username: netbox | ||
netbox_db_password: password | ||
netbox_secret_key: "-nit@y=2#)u2dz-e(de1$t*4mxpy4d9o(b4j5xf@6!ql=r-14o" | ||
|
||
netbox_superusers: | ||
- username: admin | ||
password: admin | ||
email: [email protected] | ||
|
||
# caddy_ansible.caddy_ansible configuration | ||
caddy_config: | | ||
:8080 { | ||
route /static* { | ||
uri strip_prefix /static | ||
root * /opt/netbox/current/netbox/static | ||
file_server | ||
} | ||
reverse_proxy http://127.0.0.1:8001 | ||
} | ||
# geerlingguy.postgresql configuration | ||
postgresql_users: | ||
- name: "{{ netbox_db_username }}" | ||
password: "{{ netbox_db_password }}" | ||
db: "{{ netbox_db_name }}" | ||
postgresql_databases: | ||
- name: "{{ netbox_db_name }}" | ||
owner: "{{ netbox_db_username }}" | ||
``` | ||
## Playbook | ||
# playbook-netbox.yml | ||
```yaml | ||
# playbook-netbox.yml | ||
|
||
- hosts: netbox.example.com | ||
gather_facts: yes | ||
become: yes | ||
- hosts: netbox.example.com | ||
gather_facts: yes | ||
become: yes | ||
|
||
roles: | ||
- role: geerlingguy.postgresql | ||
- role: geerlingguy.redis | ||
- role: jvoss.netbox | ||
- role: caddy_ansible.caddy_ansible | ||
roles: | ||
- role: geerlingguy.postgresql | ||
- role: geerlingguy.redis | ||
- role: jvoss.netbox | ||
- role: caddy_ansible.caddy_ansible | ||
``` | ||
## Notes | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,33 +8,38 @@ https://img.shields.io/badge/Netbox-v3.2.1-blue)](https://github.com/netbox-comm | |
[![Ansible Quality Score](https://img.shields.io/ansible/quality/56786?color=blue)](https://galaxy.ansible.com/jvoss/netbox) | ||
[![Version](https://img.shields.io/github/release/jvoss/ansible-role-netbox.svg)](https://github.com/jvoss/ansible-role-netbox/releases/) | ||
|
||
Installs and configures [Netbox](https://github.com/netbox-community/netbox) on | ||
RHEL/CentOS or Ubuntu servers. | ||
Installs, configures and maintains [NetBox](https://github.com/netbox-community/netbox) | ||
|
||
## Requirements | ||
|
||
This role manages the installation and configuration of Netbox. This role | ||
This role manages the installation and configuration of NetBox. This role | ||
does not provide PostgreSQL or Redis services that are required dependencies | ||
of the application. Those tasks are intentionally left to allow the user to | ||
manage those services within their own roles and playbooks. | ||
|
||
Tested on the following platforms: | ||
* Amazon Linux 2 | ||
* CentOS 8 | ||
* CentOS 8 | ||
* Debian Buster (up to v3.1.11) | ||
* Debian Bullseye | ||
* Rocky Linux 8 / Red Hat Enterprise Linux (RHEL) 8.2+ | ||
* Ubuntu 20.04 | ||
|
||
This role will require root access (via sudo) to manage system dependencies and actions | ||
on behalf of netbox. | ||
|
||
Supports NetBox versions 3+ | ||
|
||
## Role variables | ||
|
||
Minimum required variables assuming `localhost` PostgreSQL and Redis services | ||
are available: | ||
|
||
netbox_db_username: netbox | ||
netbox_db_password: netbox | ||
netbox_secret_key: "lnvRn_5Bypl8hBV4mMwgsMuHxr6uZvGwJyDqB7fcKqo" | ||
```yaml | ||
netbox_db_username: netbox | ||
netbox_db_password: netbox | ||
netbox_secret_key: "lnvRn_5Bypl8hBV4mMwgsMuHxr6uZvGwJyDqB7fcKqo" | ||
``` | ||
If the `netbox_secret_key` is omitted a new one will be automatically generated | ||
on each playbook run. | ||
|
@@ -54,10 +59,12 @@ parameters unless `netbox_override_dynamic_config` is set to `True`. See | |
The following variables can be defined to create users during initial | ||
installation only: | ||
|
||
netbox_superusers: | ||
- username: admin | ||
password: admin | ||
email: [email protected] | ||
```yaml | ||
netbox_superusers: | ||
- username: admin | ||
password: admin | ||
email: [email protected] | ||
``` | ||
|
||
Each user requires a username, password and email address defined. The role will | ||
attempt to create the defined users only once during initial installation. If | ||
|
@@ -77,7 +84,9 @@ Coming soon. | |
|
||
A specific version of netbox can be configured using the variable: | ||
|
||
netbox_version_tag: v3.0.9 | ||
```yaml | ||
netbox_version_tag: v3.0.9 | ||
``` | ||
|
||
This tag should match the Github tag name for the release to be installed. | ||
It will ensure that a specific target is maintained. If not set, each run will | ||
|
@@ -88,9 +97,11 @@ installation is maintained. | |
|
||
Another option is to deploy from a specifc branch and optionally a specific commit SHA | ||
|
||
netbox_install_method: git | ||
netbox_git_branch: master | ||
netbox_git_sha: 8f1acb700d72467ffe7ae5c8502422a1eac0693d # optional | ||
```yaml | ||
netbox_install_method: git | ||
netbox_git_branch: master | ||
netbox_git_sha: 8f1acb700d72467ffe7ae5c8502422a1eac0693d # optional | ||
``` | ||
|
||
## Dependencies | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,7 @@ | |
loop: | ||
- git | ||
- build-essential | ||
- cron | ||
- libxml2-dev | ||
- libxslt1-dev | ||
- libffi-dev | ||
|