Skip to content

Instantly share code, notes, and snippets.

@Miciah
Created April 11, 2018 20:26
Show Gist options
  • Save Miciah/84e2674a1816ea761ce82fe05259e81f to your computer and use it in GitHub Desktop.
Save Miciah/84e2674a1816ea761ce82fe05259e81f to your computer and use it in GitHub Desktop.
---
- name: Print the version of the atomic-openshift-master package from Yum
hosts: all
tasks:
- name: Get package information
yum:
list: atomic-openshift-master
register: pkg
- debug:
msg: '{{pkg.results[0].version | regex_search("^[0-9].[0-9]+")}}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment