Metadata

As you may have seen while browsing Ansible Galaxy, each of the roles uploaded has information on who wrote it, when it is for, a license, which version of Ansible is supported, and so on. This information is all taken from the meta/main.yml file. The one we published looks like the following:

---

galaxy_info:
author: "Russ McKendrick"
description: "Role to install the Docker CE Edge release on either an Enterprise Linux or Ubuntu host"
license: "license (BSD)"
min_ansible_version: 2.4
platforms:
- name: EL
versions:
- 6
- 7
- name: Ubuntu
versions:
- bionic
- artful
- xenial
galaxy_tags:
- docker

dependencies: []

As you can see, we are providing information in a YAML file that Ansible Galaxy will read when we publish the role. Most of the information in the file is self-explanatory, so I will not go into too much detail here:

  • author: This is your name or chosen moniker.
  • description: Add a description of your role; this will appear in searches on the command line and in the web interface, so keep it short and do not add any markup.
  • license: The license you are releasing your role under; the default is BSD.
  • min_ansible_version: The version of Ansible your role will work with. Remember, if you are using new functionality, then you must use the version that the functionality was released in. Saying you work with Ansible 1.9 but are using modules from Ansible 2.4 will only frustrate users.
  • platforms: This list of supported operating systems and releases is used when displaying information about the role, and it will play a part in a user choosing to use your role. Make sure this is accurate as, again, we do not want to frustrate users.
  • galaxy_tags: These tags are used by Ansible Galaxy to help identify what your role does.

There is one final part of the role to look at before we publish it: the README.md file.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.15.219.217