10.251.130.45:8080にjenkinsサーバーを実行しています。 サーバーはプロキシの背後にあります。 jenkins_plugin ローカルIPアドレス用にProxy Serverを使用する方法、「ローカルアドレス用にProxy Serverを使用しない」方法
「updates_url」:通過 を行く必要「https://updates.jenkins-ci.org」だから私はansibleモジュールを使用して、いくつかのジェンキンスのプラグインをインストールしたい
- プロキシ
- しかし、ipアドレスベースの呼び出しは、ローカルのjenkins インスタンスに移動する必要があります。
しかしこれは失敗します。私は、jenkinsインスタンスのURLとしてipとlocalhostの両方を使ってテストしました。すべてが代理人に行くように見えます。
プロキシ経由でDNSベースのクエリのみを実行できるようにするにはどうすればよいですか?
は以前、私が使用している:
environment:
http_proxy: http://webproxy.ec.local:9090
https_proxy: http://webproxy.ec.local:9090
だけlocalhostアドレスを使用したタスクにリセットする「」へのプロキシを設定するには、しかし、今私は、ローカルホストとリモートのURLの両方を使用する必要があります。 そして私はプロキシのlocalhostを望んでいません!
failed: [localhost] (item=authorize-project) => {
"details": "HTTP Error 502: cannotconnect",
"failed": true,
"invocation": {
"module_args": {
"attributes": null,
"backup": null,
"content": null,
"delimiter": null,
"directory_mode": null,
"follow": false,
"force": false,
"force_basic_auth": true,
"group": "jenkins",
"http_agent": "ansible-httpget",
"jenkins_home": "/var/lib/jenkins",
"mode": "0644",
"name": "authorize-project",
"owner": "jenkins",
"regexp": null,
"remote_src": null,
"selevel": null,
"serole": null,
"setype": null,
"seuser": null,
"src": null,
"state": "present",
"timeout": 500.0,
"unsafe_writes": null,
"updates_expiration": 86400,
"updates_url": "https://updates.jenkins-ci.org",
"url": "http://localhost:8080",
"url_password": "admin",
"url_username": "admin",
"use_proxy": true,
"validate_certs": true,
"version": null,
"with_dependencies": true
}
},
"item": "authorize-project",
"msg": "Cannot get CSRF"
カールを使用していくつかのテスト:
localhostのコールがansibleがやったとして502を与えます。
curl -X HEAD --proxy http://webproxy.ec.local:9090 -i localhost:8080 // 502
curl -X HEAD --proxy http://webproxy.ec.local:9090 -i 10.251.130.45:8080 // FAIL, timeout
curl -X HEAD -i http://10.251.130.45:8080 // 200 ok