由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
它列出了所有可用选项,没有任何错误

关于docker - 如何使用awx cli?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/61399752/

10-11 07:02