Skip to content

Commit

Permalink
Derive ANSIBLE_CONTENT_HOSTNAME from CONTENT_ORIGIN
Browse files Browse the repository at this point in the history
  • Loading branch information
fao89 committed Oct 5, 2020
1 parent 787953b commit 02c1ffb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGES/7368.removal
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Derive ANSIBLE_CONTENT_HOSTNAME from CONTENT_ORIGIN
6 changes: 3 additions & 3 deletions docs/settings.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ ANSIBLE_CONTENT_HOSTNAME
The origin, e.g. "http://example.com" that will instruct the client how to find the Pulp content
app. This URL is formed in various Galaxy APIs (V1, V2, V3) responses.

This defaults to http on your fqdn, which is usable with the Ansible installer's default Nginx
configuration. By default it includes the ``pulp/content`` subpath. So if `example.com` is your
fqdn, this would default to "http://example.com/pulp/content".
This defaults to `CONTENT_ORIGIN <https://docs.pulpproject.org/pulpcore/settings.html?#content-origin>`_.
By default it includes the ``pulp/content`` subpath. So if `https://example.com` is your
CONTENT_ORIGIN, this would default to "https://example.com/pulp/content".


GALAXY_API_ROOT
Expand Down
3 changes: 2 additions & 1 deletion pulp_ansible/app/settings.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import socket

from dynaconf import settings

LOGGING = {
"loggers": {
Expand All @@ -20,4 +21,4 @@
}

ANSIBLE_API_HOSTNAME = "http://" + socket.getfqdn()
ANSIBLE_CONTENT_HOSTNAME = "http://" + socket.getfqdn() + "/pulp/content"
ANSIBLE_CONTENT_HOSTNAME = settings.CONTENT_ORIGIN + "/pulp/content"

0 comments on commit 02c1ffb

Please sign in to comment.