vidimensional.github_release_lookup.github_release (6.6.6) — lookup

Lookup release information for a given GitHub repository.

Authors: Daniel Vidal de la Rubia (@vidimensional)

Install collection

Install with ansible-galaxy collection install vidimensional.github_release_lookup:==6.6.6


Add to requirements.yml

  collections:
    - name: vidimensional.github_release_lookup
      version: 6.6.6

Description

- Lookup release information for a given GitHub repository. - We can get either the latest release. - Or we can get a release that matches [python-semanticversion SimpleSpec](https://python-semanticversion.readthedocs.io/en/latest/reference.html#semantic_version.SimpleSpec) constrain. - Also we can disable the prereleases from the query.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Get the latest Terraform final release.
  ansible.builtin.debug:
    msg: "{{ lookup('github_release', repo='hashicorp/terraform') }}"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Get the latest AWS-CLI (including preseleases).
  ansible.builtin.debug:
    msg: "{{ lookup('github_release', repo='aws/aws-cli', spec='latest', allow_prereleases=True) }}"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Get latest release from a private repo.
  ansible.builtin.debug:
    # ⚠️ Be careful not to send the plain text token to your VCS.
    msg: "{{ lookup('github_release', repo='myorg/some-private-repo',  token='1234') }}"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Get latest Ansible version for branch 2.13
  ansible.builtin.debug:
    msg: "{{ lookup('github_release', repo='ansible/ansible', spec='>=2.13.0,<2.14') }}"

Inputs

    
repo:
    default: null
    description: GitHub repository to query (`USER/REPO_NAME`).
    required: true
    type: string
    version_added: 0.0.1
    version_added_collection: vidimensional.github_release_lookup

spec:
    default: latest
    description: The query for the release to retrieve. It can be `latest` that would
      retireve the most recent version. Or it can be a [`python-semanticversion SimpleSpec`](https://python-semanticversion.readthedocs.io/en/latest/reference.html#semantic_version.SimpleSpec).
    required: false
    type: string
    version_added: 0.0.1
    version_added_collection: vidimensional.github_release_lookup

token:
    default: None
    description: If provided, it'd be used to send requests to GitHub API. Useful to avoid
      API request limit errors or accesing private repos.
    required: false
    type: string
    version_added: 0.0.1
    version_added_collection: vidimensional.github_release_lookup

allow_prereleases:
    default: 'False'
    description: If False it'll ignore the releases with [pre-release versions](https://semver.org/spec/v2.0.0.html#spec-item-9).
    required: false
    type: boolean
    version_added: 0.0.1
    version_added_collection: vidimensional.github_release_lookup