From 02c1ffb555000325e978035c7a87fb61498fa8dc Mon Sep 17 00:00:00 2001 From: Fabricio Aguiar Date: Mon, 28 Sep 2020 17:36:37 -0300 Subject: [PATCH] Derive ANSIBLE_CONTENT_HOSTNAME from CONTENT_ORIGIN https://pulp.plan.io/issues/7368 closes #7368 --- CHANGES/7368.removal | 1 + docs/settings.rst | 6 +++--- pulp_ansible/app/settings.py | 3 ++- 3 files changed, 6 insertions(+), 4 deletions(-) create mode 100644 CHANGES/7368.removal diff --git a/CHANGES/7368.removal b/CHANGES/7368.removal new file mode 100644 index 000000000..2075a4398 --- /dev/null +++ b/CHANGES/7368.removal @@ -0,0 +1 @@ +Derive ANSIBLE_CONTENT_HOSTNAME from CONTENT_ORIGIN diff --git a/docs/settings.rst b/docs/settings.rst index bef46abe6..58e103549 100644 --- a/docs/settings.rst +++ b/docs/settings.rst @@ -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 `_. + 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 diff --git a/pulp_ansible/app/settings.py b/pulp_ansible/app/settings.py index 253509228..2e7c2a235 100644 --- a/pulp_ansible/app/settings.py +++ b/pulp_ansible/app/settings.py @@ -1,5 +1,6 @@ import socket +from dynaconf import settings LOGGING = { "loggers": { @@ -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"