ansible_puller icon indicating copy to clipboard operation
ansible_puller copied to clipboard

Add auth header support.

Open dmeulen opened this issue 1 year ago • 1 comments

This makes it possible to authenticate with the gitlab or github API by specifying a PRIVATE-TOKEN or Authorization header with the http request.

Now you can download the ansible source tarball and md5 directly from the gitlab or github package registry using the gitlab API.

example config:

{
  "http-url": "gitlab.ops.catdevbrain.lan/api/v4/projects/4/jobs/artifacts/main/raw/catdevbrain-ansible-latest.tar.gz?job=build_latest",
  "http-checksum-url": "gitlab.ops.catdevbrain.lan/api/v4/projects/4/jobs/artifacts/main/raw/catdevbrain-ansible-latest.tar.gz.md5?job=build_latest",
  "http-proto": "https",
  "http-header-name": "PRIVATE-TOKEN",
  "http-header-value": "<REDACTED>",
  "ansible-dir": "ansible",
  "ansible-inventory": ["inventories/catdevbrain"],
  "playbook": "site.yml",
  "sleep": "10",
  "sleep-jitter": "5"
}

dmeulen avatar Sep 11 '24 12:09 dmeulen

Will update whein I find some time, rather busy atm! Thanks for the review!

dmeulen avatar Oct 03 '24 11:10 dmeulen