Translated message

A translation of this page exists in English.

AAP 2.5 GA で awx CLI が動作するための設定

Solution In Progress - Updated -

Issue

automation-controller-cli-4.6.1-1.el9ap.noarch から awx CLI ツールを実行する際に問題が発生した場合、ここに記載するヒントが役に立つかもしれません。

ansible-automation-platform-2.5-for-rhel-9-x86_64-rpms リポジトリーから automation-controller-cli をインストールしました。

awx cli を使用しようとすると、次のエラーが表示されます。

$ awx
Traceback (most recent call last):
  File "/usr/bin/awx", line 5, in <module>
    from awxkit.cli import run
  File "/usr/lib/python3.11/site-packages/awxkit/cli/__init__.py", line 9, in <module>
    from .client import CLI
  File "/usr/lib/python3.11/site-packages/awxkit/cli/client.py", line 5, in <module>
    import pkg_resources
ModuleNotFoundError: No module named 'pkg_resources'
  • または以下が表示されます *
$ awx login --conf.host https://example.lan --conf.username admin --conf.password XXXX -k -v
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): example.lan:443
DEBUG:urllib3.connectionpool:https://example.lan:443 "GET /api/ HTTP/1.1" 200 None
DEBUG:awxkit.api.client:"GET https://example.lan/api/" elapsed: 0:00:00.051963
Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/awxkit/cli/client.py", line 136, in fetch_version_root
    self.v2 = self.root.get().available_versions.v2.get()
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/awxkit/api/pages/page.py", line 115, in __getattr__
    raise AttributeError("{!r} object has no attribute {!r}".format(self.__class__.__name__, name))
AttributeError: 'Api' object has no attribute 'available_versions'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/awxkit/cli/__init__.py", line 24, in run
    cli.connect()
  File "/usr/lib/python3.11/site-packages/awxkit/cli/client.py", line 123, in connect
    self.fetch_version_root()
  File "/usr/lib/python3.11/site-packages/awxkit/cli/client.py", line 138, in fetch_version_root
    raise RuntimeError('An error occurred while fetching {}/api/'.format(self.get_config('host')))
RuntimeError: An error occurred while fetching https://example.lan/api/

Environment

RHEL9 AAP 2.5 GA リリース 2024 年 9 月

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content