如果在linux上离线安装awx,可以自行下载相关包,或者给我留言,我发给大家。wgethttps://github.com/ansible/awx/archive/1.0.7.ta??r.gz失败https://github.com/ansible/awx/archive/11.0.0.tar.gz在虚拟机上成功启动wget机器https://github.com/ansible/awx/archive/13.0.0.tar.gz需要python3tar-zxvf11.0。0.tar.gzcdawx-11.0.0/installer/ansible-playbook-iinventoryinstall.yml注意:有可能端口占用了dockerstopawx_taskawx_webawx_postgresawx_redisawx_memcacheddockerstopmemcachedrabbitmqpostgresdockerrmawx_taskawx_posterdockawx_posterawx_webawxmemcachedrabbitmqpostgres离线安装下载pipdownloaddocker-d/data/dockerinstallpipinstall--ignore-installedrequests--no-index--find-links=file:/data/dockerdockerpipdownloaddocker-compose-d/data/docker_composepipinstall--no-index--find-links=file:/data/docker_composedocker_compose在线安装pipinstalldockerpipinstalldocker-composepipinstall-ihttp://pypi.douban.com/simple/--trusted-hostpypi.douban.comdocker-compose==1.16.0pip3安装请求spip3installdockerpip3installdocker-composeddockerexec-itawx_task/bin/bashcd/var/lib/awx/projects/ansible-for-devops/catmain.yml----名称:测试日期cmd主机:所有连接:本地任务:-名称:检查服务器上的ping。命令:datecatuploadfile.yml-名称:文件上传主机:所有连接:paramiko任务:-名称:创建目录shell:mkdir-p/data/iot-名称:上传文件。复制:src={{path}}dest=/data/iotimportinventorydockerexec-itawx_task/bin/bashawx-manageinventory_import--source=/etc/ansible/hosts--group-filter=iot-test--inventory-name=iot--keep-vars--source指定清单文件--group-filter按组名从文件中过滤--host-filter按主机名过滤--inventory-name导入到指定名称资产列表--inventory-id导入指定ID#名称和id的资产列表中选择一个--overwrite覆盖主机和组,默认不覆盖--overwrite-vars覆盖主机变量--keep-vars保留主机变量--enabled-valueimported主机状态默认是否激活cathosts[iotdb-host]#在[]中是一个组,iot-test是组名,后面会用到#139.9.130.81安西布尔e_ssh_port=22ansible_ssh_user=rootansible_ssh_pass=abcd_2020114.116.194.17ansible_ssh_port=22ansible_ssh_user=rootansible_ssh_pass=abcd_2019192.168.140.102ansible_ssh_port=22ansible_ssh_user=rootansible_ssh_pass=abcd123tower-manageinventory_import--source=/data/hosts--group-过滤器=iotdb-host--inventory-name=iotdb--keep-vars
