artis3n / artis3n.github_version / 1.0.3 / lookup / github_version Get the latest tagged release version from a public Github repository. | "added in version" 2.9 of artis3n.github_version" Authors: Ari Kalfus (@artis3n) <dev@quantummadness.com>artis3n.github_version.github_version (1.0.3) — lookup
Install with ansible-galaxy collection install artis3n.github_version:==1.0.3
collections: - name: artis3n.github_version version: 1.0.3
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: 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/{{ item }}.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