Skip to content

Instantly share code, notes, and snippets.

@robrant
Created August 18, 2017 06:32
Show Gist options
  • Save robrant/9266d4efaffa37b449940a05e0e1231b to your computer and use it in GitHub Desktop.
Save robrant/9266d4efaffa37b449940a05e0e1231b to your computer and use it in GitHub Desktop.
Find and install a local rpm
# The version of createrepo coming over can change
# We can't wildcard in ansible yum, so list with wildcard, then install
- name: List the files called create repo
find:
paths: "{{ yum_repo_location }}"
patterns: "createrepo*.rpm"
register: create_repo_files
- name: Install correct version of create repo
yum:
name: "{{ create_repo_files['files'][0]['path'] }}"
state: installed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment