This Ansible guide discusses several approaches on how to set different
role default variables
based / depending on the host operating system aka ansible_distribution
/
ansible_facts.distribution
or other variables. For example, a role
variable image_uri
should point to the latest cloud image for the host.
For CentOS 8
or Red Hat Enterprise Linux (RHEL) 8
the default value
should be:
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
# The full public facing url | |
#root_url = %(protocol)s://%(domain)s:%(http_port)s/ | |
root_url = http://localhost:80/grafana/ |
Assume your deployment is under /netbox
:
Add to configuration/configuration.py
BASE_PATH = environ.get('BASE_PATH', '')
Add to env/netbox.env