The plugin.spec holds the descriptions of all the CLI flags as well as plugin name and plugin descriptions.
Sample plugin specification file can be like:

config:plugin_type:otherentry_point:main.ymlsubparsers:# the actual name of the pluginsimple-plugin:description:Thisisasimpledemoplugininclude_groups:["Ansible options","Common options"]groups:-title:Optiongroup.options:option1:type:Valuehelp:Simpleoptionwithdefaultvaluedefault:fooflag:type:Booldefault:False

Config section:

plugin_type:

Depending of what plugin is intended to do, can be provision, install, test or other.
See plugin specification for details.

entry_point:

The main playbook for the plugin. by default this will refer to main.yml file
but can be changed to ant other file.

Options::

pluginname under the subparsers

Infrared extends it CLI with that name.
It is recommended to use dash-separated-lowercase-words for plugin names.

include_groups: list what standard flags should be included to the plugin CLI.

Usually we include “Ansible options” to provide ansible specific options and “Common Options” to
get --extra-vars, --output and --dry-run. See plugins include groups for more information.

Now when plugin specification is ready we need to put some business logic into a plugin.
Infrared collects user input from command line and pass it to the ansible by calling main
playbook - that is configured as entry_point in plugins.spec.