如何使用 awx 客户端?

How to use awx cli?

通过 docker-compose 从 official guide 安装了 awx。

以这种方式安装 awx cli:

pip install "https://github.com/ansible/awx/archive/11.1.0.tar.gz#egg=awxkit&subdirectory=awxkit"

检查其配置

# awx config
{
     "base_url": "https://127.0.0.1:443",
     "token": "",
     "use_sessions": false,
     "credentials": {
          "default": {
               "username": "admin",
               "password": "password"
          }
     }
}

获取用户列表

# awx --conf.host https://127.0.0.1:443 \
>     --conf.username admin --conf.password password \
>     --conf.insecure \
>     users list

...

There was a network error of some kind trying to reach https://127.0.0.1:443.
You might need to specify (or double-check) --conf.host

HTTPSConnectionPool(host='127.0.0.1', port=443): Max retries exceeded with url: /api/ (Caused by ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 403 Forbidden')))

它是在没有 SSL 的情况下默认配置安装的。如何更改base_url?

我检查了 Authentication document,由于 https 问题无法通过身份验证。


从文件中,这种方式可以生成文件:

# pip install sphinx sphinxcontrib-autoprogram

~ TOWER_HOST=https://awx.example.org TOWER_USERNAME=example TOWER_PASSWORD=secret make clean html
~ cd build/html/ && python -m http.server
Serving HTTP on 0.0.0.0 port 8000 (http://0.0.0.0:8000/) ..

但是当我 运行 它得到这个错误

make: *** No rule to make target `clean'.  Stop.

在哪里 运行 这个命令?

这个在我的系统上有效:

awx--conf.host http://127.0.0.1:80

它列出了所有可用的选项,没有任何错误