Skip to content

Commit

Permalink
Minor updates to user-facing log messages.
Browse files Browse the repository at this point in the history
This simple changes the warning for basic authentication against AAP as
well as removes the duplicate printing of the settings file source
location.
  • Loading branch information
JacobCallahan committed Aug 21, 2024
1 parent 4597520 commit 5ab33a9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
8 changes: 1 addition & 7 deletions broker/providers/ansible_tower.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""Ansible Tower provider implementation."""
from datetime import datetime
from functools import cache, cached_property
import inspect
import json
Expand Down Expand Up @@ -74,13 +73,8 @@ def get_awxkit_and_uname(config=None, root=None, url=None, token=None, uname=Non
) from err
else: # dynaconf validators should have checked that either token or password was provided
helpers.emit(auth_type="password")
if datetime.now() < datetime(2023, 2, 6):
time_based_modifier = " and will be unavailable soon"
else:
time_based_modifier = ""
logger.warning(
f"Password-based authentication is deprecated{time_based_modifier}. "
"Please use a token instead.\n"
"You should probably be using token-based authentication.\n"
"See https://docs.ansible.com/automation-controller/latest/html/userguide/"
"applications_auth.html#applications-tokens for more information"
)
Expand Down
2 changes: 1 addition & 1 deletion broker/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def init_settings(settings_path, source, interactive=False, is_url=False):
try:
proceed = (
click.prompt(
f"Get example file from {source}?\n{source}",
f"Get example file from {source}?\n",
type=click.Choice(["y", "n"]),
default="y",
)
Expand Down

0 comments on commit 5ab33a9

Please sign in to comment.