我每次都会收到此错误,但仅在尝试从 Ansible Tower 上传到 Artifactory 时出现在特定文件上。
这些文件都是在清单主机上创建的Oracle_Collection_Tool
,然后在上传到 Artifactory 之前获取到 Ansible Tower 节点。这些文件在运行收集工具的主机上看起来都很正常,并且都已成功获取。这value False (type bool)
所有文件都会出现警告。
这不是 Artifactory 端的瓶颈,因为我已经尝试限制它,并仅针对一台库存主机运行它。相同的文件每次都会失败,而其他文件每次都会成功。
剧本任务和错误输出如下。所有 URL/主机名/用户名等均已匿名。有人可以帮忙吗?
剧本任务:
- name: Pushing bz2 file to artifactory
uri:
url: "{{ artifactory_url }}/{{ directory_str }}/{{ collection_file.stdout }}"
user: "{{ artifactory_user }}"
password: "{{ artifactory_password }}"
force_basic_auth: yes
method: PUT
return_content: yes
src: "/tmp/Oracle_Collection_Tool/output/{{ collection_file.stdout }}"
headers:
Content-Type: application/tar
Accept: application/json
status_code: 201
remote_src: no
Error:
{
"status": -1,
"_ansible_no_log": false,
"warnings": [
"The value False (type bool) in a string field was converted to u'False' (type string). If this does not look like what you expect, quote the entire value to ensure it does not change."
],
"url": "http://artifactory-host:8081/artifactory/linux-team-generic/Oracle_Audit/Collection-hostname_all.tar.bz2",
"changed": false,
"elapsed": 30,
"content": "",
"invocation": {
"module_args": {
"directory_mode": null,
"force": false,
"remote_src": "False",
"status_code": [
"201"
],
"body_format": "raw",
"owner": null,
"follow": false,
"client_key": null,
"group": null,
"use_proxy": true,
"unix_socket": null,
"unsafe_writes": null,
"serole": null,
"content": null,
"setype": null,
"follow_redirects": "safe",
"return_content": true,
"method": "PUT",
"body": null,
"timeout": 30,
"url_password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
"dest": null,
"selevel": null,
"force_basic_auth": true,
"removes": null,
"http_agent": "ansible-httpget",
"user": "linux_account",
"regexp": null,
"password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
"src": "/home/tower-username/.ansible/tmp/ansible-tmp-9999999999.99-999999999999999/Collection-hostname_all.tar.bz2",
"url": "http://artifactory-host:8081/artifactory/linux-team-generic/Oracle_Audit/Collection-hostname_all.tar.bz2",
"backup": null,
"seuser": null,
"client_cert": null,
"creates": null,
"headers": {
"Content-Length": 12408,
"Content-Type": "application/tar",
"Accept": "application/json"
},
"delimiter": null,
"mode": null,
"url_username": "linux_account",
"attributes": null,
"validate_certs": true
}
},
"redirected": false,
"msg": "Status code was -1 and not [201]: Request failed: <urlopen error timed out>"
}