Skip to content

Script to create an RPM spec file for an Ansible Galaxy collection

License

Notifications You must be signed in to change notification settings

javierpena/galaxy-collection-to-rpm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ansible collections to RPM converter

This script will contact the Ansible Galaxy API to fetch information about an Ansible Collection, and use that to build an RPM spec file.

Requirements

  • Jinja2
  • pbr
  • requests

Installation

The script is provided as a Python package. You can install it on a local virtual environment, or as an RPM package. There is a Copr repository ready to use:

$ sudo dnf copr enable jpena/galaxy-collection-to-rpm
$ sudo dnf install galaxycollection-to-rpm

You can also run python galaxycollection_to_rpm/galaxycollection_to_rpm.py directly if needed, from the git checkout.

Usage

$ galaxy-collection-to-rpm --collection <collection-name>

This command-line will send the resulting spec file to standard output. You can also specify the target file using:

$ galaxy-collection-to-rpm --collection <collection-name> --output-file file.spec

Make sure you check the generated spec file, since some fields may require adjustments. One example is the license, which may not be using the names required by the packaging guidelines.

License

Apache 2.0

Author

Javier Peña (@fj_pena)

About

Script to create an RPM spec file for an Ansible Galaxy collection

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •