Skip to content
This repository has been archived by the owner on Jul 30, 2020. It is now read-only.

Role Metadata

Chris Houseknecht edited this page May 4, 2018 · 5 revisions

Role metadata is found in meta/main.yml at the root of the role directory tree. It's a YAML file containing two sections: galaxy_info and dependencies.

The galaxy_info section is used to pass information about the role to the Galaxy server, when the role is imported into Galaxy. The information contained here does not influence how Ansible will execute the role. Its sole function is to help inform the Galaxy search index.

The dependencies section is a list. It can be an empty list, or it can contain a set of dependent roles that will be executed by Ansible, prior to running the role. For more on how roles dependencies are handled and executed by Ansible, plus examples of specifying roles in the dependencies section, view the Roles guide at the Ansible Docs site.

Below is an example, showing all of the available attributes that can be set by a content creator in meta/main.yml

galaxy_info:
  author: Author Name
  description: An outstanding role that does magical things to your infrastructure. Run it, and see!
  company: Acme, Co.

  # If the issue tracker for your role is not on GitHub, uncomment the
  # next line and provide a value
  # issue_tracker_url: http://example.com/issue/tracker

  # Some suggested licenses:
  # - BSD (default)
  # - MIT
  # - GPLv2
  # - GPLv3
  # - Apache
  # - CC-BY
  license: Apache v2

  min_ansible_version: 2.4

  # If this a Container Enabled role, provide the minimum Ansible Container version.
  # min_ansible_container_version:

  # Optionally specify the branch Galaxy will use when accessing the GitHub
  # repo for this role. During role install, if no tags are available,
  # Galaxy will use this branch. During import Galaxy will access files on
  # this branch. If Travis integration is configured, only notifications for this
  # branch will be accepted. Otherwise, in all cases, the repo's default branch
  # (usually master) will be used.
  #github_branch:

  # Required. Provide a list of platforms and releases targeted by this role.
  platforms:
  - name: MacOSX
    versions:
      - 10.11
  - name: Fedora
    versions:
      - all
  - name: Ubuntu
    versions:
      - all

  #Optional. Provide a list of Cloud platforms targeted by this role.
  cloud_platforms:
    - AWS
    - Google

  # Optional. Categorize this role by providing a list of search tags.
  galaxy_tags:
    - oc
    - openshift
    - container
    - cluster
    - minishift

dependencies: []

Platforms and Releases

Where do I find a list of valid platforms and releases? How do I suggest a missing platform or release?

Cloud Platforms

Where do I find a list of valid cloud platforms? How do I suggest a missing platform?

Tags

How do I see the list of existing tags, and see which ones are popular?