Current Series Release Notes

2.1.0

New Features

  • Added support for arguments that can be used to avoid templating Jinja content:

    • variable_start_string

    • variable_end_string

    • block_start_string

    • block_end_string

Bug Fixes

  • Jinja2 {% raw %} tag and string escapnig, as well as special headers in template files are working as expected now.

2.0.0

Deprecation Notes

  • Installation from PyPI or as a Python module is deprecated and will be removed in future releases. Please, use ansible-galaxy for plugin installation.

1.1.0

New Features

  • The ability to set remote_src has been added to the config_template action plugin. This option will instruct the config_template action plugin to use an already remote file as its source content.

  • Config template comment parser will now respect all comments and spacing throughout INI files. This will allow us to use OSLO config to generate files which contain commentary about the various defaults. This enhancement will allow operators to benefit from deployer comments and system commentary all from within the on-disk files while keeping all of the flexibility the config_template action plugin provides.

  • The config_template action plugin will now search for options within a given section that may be commented within an INI file, and if a an option is following the OSLO config pattern, ‘#OPTION_KEY…’ pattern, config_template will insert the override one line after the comment. This provides operators the ability to see in service options and any comments regarding the option within the configuration file on-disk.

  • Option parsing in config_template has been extended to allow for array only overrides. This enhancement will allow us to ingest files which contain only an array. For this work, the config_overrides now accepts both a hash and an array, and will merge, replace, or extend based on the data-type.

1.0.0

New Features

  • The config_template template module now supports writing out valueless INI options without suffixing them with ‘=’ or ‘:’. This is done via the ‘ignore_none_type’ attribute. If ignore_none_type is set to true, these key/value entries will be ignored, if it’s set to false, then ConfigTemplateParser will write out only the option name without the ‘=’ or ‘:’ suffix. The default is true.

  • The ability to support MultiStrOps has been added to the config_template action plugin. This change updates the parser to use the set() type to determine if values within a given key are to be rendered as MultiStrOps. If an override is used in an INI config file the set type is defined using the standard yaml construct of “?” as the item marker.

    # Example Override Entries
    Section:
      typical_list_things:
        - 1
        - 2
      multistrops_things:
        ? a
        ? b
    
    # Example Rendered Config:
    [Section]
    typical_list_things = 1,2
    multistrops_things = a
    multistrops_things = b
    
  • Compare dict vars of before and after configuration to determine whether the config keys or values have changed so a configuration file will not be incorrectly marked as changed when only the ordering has changed.

  • Set diff return variable to a dict of changes applied.

  • The config_template action plugin now has a new option to toggle list extension for JSON or YAML formats. The new option is list_extend and is a boolean. The default is True which maintains the existing API.

  • Allow the default section in an ini file to be specified using the default_section variable when calling a config_template task. This defaults to DEFAULT.