Skip to content

Commit

Permalink
Update docs and set superuser_enabled default to true (#128 amendment)
Browse files Browse the repository at this point in the history
  • Loading branch information
lae committed May 22, 2021
1 parent 00c622b commit 9a30774
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 11 deletions.
21 changes: 12 additions & 9 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -126,21 +126,21 @@ netbox_git_uri: "https://github.com/netbox-community/netbox.git"

[source,yaml]
----
netbox_superuser_enabled: true
netbox_superuser_username: admin
#netbox_superuser_password: changeme
netbox_superuser_email: admin@localhost
netbox_superuser_enabled: false
netbox_superuser_create_token: false
----

It is *required* to set the superuser password. This role will create a new
superuser if the user does not exist, or will modify an existing user if they're
not a superuser/have a different email or password. (Yes, you can use this to
reset your superuser password if you forget it.) it is possible to set a random
generate API-token for the superuser. You can create a superuser and configure LDAP.

These variables are used to configure a local superuser account. Disable this
if you do not want to create one (when using LDAP for example - though having a
local superuser may still be beneficial in that case). When enabled, it is
*required* to set the superuser password. This role will create a new superuser
if the user does not exist, or will modify an existing user if they're not a
superuser/have a different email or password. (Yes, you can use this to reset
your superuser password if you forget it.) `netbox_superuser_create_token` can
be used to generate a random API token for the superuser, if needed.

[source,yaml]
----
Expand Down Expand Up @@ -345,6 +345,9 @@ default, Ansible will search your playbook's `templates/` directory for this.
You can find an example in `examples/`. You will also need to set
`netbox_config.REMOTE_AUTH_BACKEND` to `netbox.authentication.LDAPBackend`.

TIP: By default, a local (non-LDAP) superuser will still be created by this
role. If this is undesirable, consider toggling `netbox_superuser_enabled`.

[source,yaml]
----
netbox_napalm_enabled: false
Expand Down
2 changes: 1 addition & 1 deletion defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ netbox_git_uri: "https://github.com/netbox-community/netbox.git"

netbox_install_epel: true

netbox_superuser_enabled: false
netbox_superuser_enabled: true
netbox_superuser_username: admin
# netbox_superuser_password: changeme
netbox_superuser_email: admin@localhost
Expand Down
1 change: 0 additions & 1 deletion tests/group_vars/netbox
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ netbox_reports:
- src: reports/nothing.py
name: nothing
netbox_napalm_enabled: true
netbox_superuser_enabled: true
netbox_superuser_password: netbox
netbox_superuser_create_token: true
netbox_database: "netbox_{{ inventory_hostname_short }}"
Expand Down

0 comments on commit 9a30774

Please sign in to comment.