artis3n / artis3n.github / 1.0.0 / lookup / latest_release Get the latest tagged release version from a public Github repository. | "added in version" 2.9 of artis3n.github" Authors: Ari Kalfus (@artis3n) <dev@quantummadness.com>artis3n.github.latest_release (1.0.0) — lookup
Install with ansible-galaxy collection install artis3n.github:==1.0.0
collections: - name: artis3n.github 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: Strip the 'v' out of the tag version, e.g. 'v1.0.0' -> '1.0.0' set_fact: ansible_version: "{{ lookup('artis3n.github.latest_release', 'ansible/ansible')[1:] }}"
- name: Operate on multiple repositories git: repo: https://github.com/{{ item }}.git version: "{{ lookup('artis3n.github.latest_release', 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