As AWX recommend to have plays on SCM, so I picked up GIT =)
I am wondering if we can configure the way git works in AWX, it seems there is proxy configuration somewhere is AWX and that’s why I am not able to get the playbook from internal GITLAB repo I setup.
Enter code here...{
“_ansible_parsed”: true,
“stderr_lines”: [
“fatal: unable to access ‘http:///root/ansible-test-project-1/’: The requested URL returned error: 503”
],
“changed”: false,
“_ansible_no_log”: false,
“stdout”: “Cloning into ‘/var/lib/awx/projects/_11__gitlab_1’…\n”,
“cmd”: “/usr/bin/git clone --origin origin http:///root/ansible-test-project-1 /var/lib/awx/projects/_11__gitlab_1”,
“msg”: “fatal: unable to access ‘http:///root/ansible-test-project-1/’: The requested URL returned error: 503”,
“stderr”: “fatal: unable to access ‘http:///root/ansible-test-project-1/’: The requested URL returned error: 503\n”,
“rc”: 128,
“invocation”: {
“module_args”: {
“executable”: null,
“refspec”: null,
“force”: false,
“track_submodules”: false,
“separate_git_dir”: null,
“dest”: “/var/lib/awx/projects/_11__gitlab_1”,
“accept_hostkey”: false,
“clone”: true,
“umask”: null,
“update”: true,
“ssh_opts”: null,
“repo”: “http:///root/ansible-test-project-1”,
“depth”: null,
“version”: “HEAD”,
“bare”: false,
“verify_commit”: false,
“remote”: “origin”,
“key_file”: null,
“archive”: null,
“reference”: null,
“recursive”: true
}
},
“stdout_lines”: [
“Cloning into ‘/var/lib/awx/projects/_11__gitlab_1’…”
]
}
I assumed git in AWX uses the git in Linux as stated in logs, but I am getting different issue in command line:
`
GIT_CURL_VERBOSE=1 git clone --origin origin http:///root/ansible-test-project-1 /tmp/tt
Cloning into ‘/tmp/tt’…
- Couldn’t find host in the .netrc file; using defaults
- About to connect() to port 80 (#0)
- Trying 10.14.11.48…
- Connected to (10.14.11.48) port 80 (#0)
GET /root/ansible-test-project-1/info/refs?service=git-upload-pack HTTP/1.1
User-Agent: git/1.8.3.1
Host:
Accept: /
Accept-Encoding: gzip
Pragma: no-cache
< HTTP/1.1 301 Moved Permanently
< Server: nginx
< Date: Fri, 23 Nov 2018 14:21:40 GMT
< Content-Type: text/html
< Content-Length: 168
< Connection: keep-alive
< Cache-Control: no-cache
< Location: http:///root/ansible-test-project-1.git/info/refs?service=git-upload-pack
< X-Request-Id: hq2I9uDQ3p4
< X-Runtime: 0.034195
< Strict-Transport-Security: max-age=31536000
<
- Ignoring the response-body
- Connection #0 to host left intact
- Issue another request to this URL: ‘http:///root/ansible-test-project-1.git/info/refs?service=git-upload-pack’
- Couldn’t find host in the .netrc file; using defaults
- Found bundle for host : 0x9152f0
- Re-using existing connection! (#0) with host
- Connected to (10.14.11.48) port 80 (#0)
GET /root/ansible-test-project-1.git/info/refs?service=git-upload-pack HTTP/1.1
User-Agent: git/1.8.3.1
Host:
Accept: /
Accept-Encoding: gzip
Pragma: no-cache
< HTTP/1.1 200 OK
< Server: nginx
< Date: Fri, 23 Nov 2018 14:21:40 GMT
< Content-Type: application/x-git-upload-pack-advertisement
< Content-Length: 351
< Connection: keep-alive
< Cache-Control: no-cache
< Strict-Transport-Security: max-age=31536000
<
- Connection #0 to host left intact
- Couldn’t find host in the .netrc file; using defaults
- About to connect() to port 80 (#1)
- Trying 10.14.11.48…
- Connected to (10.14.11.48) port 80 (#1)
POST /root/ansible-test-project-1/git-upload-pack HTTP/1.1
User-Agent: git/1.8.3.1
Host:
Accept-Encoding: gzip
Content-Type: application/x-git-upload-pack-request
Accept: application/x-git-upload-pack-result
Content-Length: 192
- upload completely sent off: 192 out of 192 bytes
- The requested URL returned error: 404 Not Found
- Closing connection 1
error: RPC failed; result=22, HTTP code = 404
fatal: The remote end hung up unexpectedly
`