thomasbaumeister / thomasbaumeister.github_version / 1.0.0 / lookup / github_version Get the latest tagged releaase version from a public Github repository | "added in version" 0.1 of thomasbaumeister.github_version" Authors: Thomas Baumeister Thomas@Baumeister-web.dethomasbaumeister.github_version.github_version (1.0.0) — lookup
Install with ansible-galaxy collection install thomasbaumeister.github_version:==1.0.0
collections: - name: thomasbaumeister.github_version version: 1.0.0
This lookup returns the latest tagged release version of a public Github repository.
A future version will accept an optional Github token to allow lookup of private repositories.
- name: Get the latest version, also strip the 'v' out of the tag version, e.g. 'v1.0.0' -> '1.0.0' set_fact: ansible_version: "{{ lookup('github_version', 'ansible/ansible')[1:] }}"
- name: Operate on multiple repositories git: repo: https://github.com/.git version: "{{ lookup('github_version', item) }}" dest: "{{ lookup('env', 'HOME') }}/projects" with_items: - ansible/ansible - ansible/molecule - ansible/awx
repos: description: A list of Github repositories from which to retrieve versions. required: true
_list: description: - List of latest Github repository version(s) type: list