Skip to content

Instantly share code, notes, and snippets.

@cloudnull
Created July 22, 2019 20:18
Show Gist options
  • Save cloudnull/47d55616c08db73c6baef7540d08e4b0 to your computer and use it in GitHub Desktop.
Save cloudnull/47d55616c08db73c6baef7540d08e4b0 to your computer and use it in GitHub Desktop.
enhanced comment parsing config_template https://review.opendev.org/#/c/672170
[DEFAULT]
#
# From nova.conf
#
#
# Availability zone for internal services. For more information, refer to the
# documentation. (string value)
#internal_service_availability_zone = internal
#
# Default availability zone for compute services. For more information, refer to
# the documentation. (string value)
#default_availability_zone = nova
#
# Default availability zone for instances. For more information, refer to the
# documentation. (string value)
#default_schedule_zone = <None>
# Length of generated instance admin passwords (integer value)
# Minimum value: 0
#password_length = 12
#
# Time period to generate instance usages for. It is possible to define optional
# offset to given period by appending @ character followed by a number defining
# offset. For more information, refer to the documentation. (string value)
#instance_usage_audit_period = month
[DEFAULT]
#
# From nova.conf
#
#
# Availability zone for internal services. For more information, refer to the
# documentation. (string value)
#internal_service_availability_zone = internal
#
# Default availability zone for compute services. For more information, refer to
# the documentation. (string value)
#default_availability_zone = nova
#
# Default availability zone for instances. For more information, refer to the
# documentation. (string value)
#default_schedule_zone = <None>
# Length of generated instance admin passwords (integer value)
# Minimum value = 0
#password_length = 12
password_length = 100
#
# Time period to generate instance usages for. It is possible to define optional
# offset to given period by appending @ character followed by a number defining
# offset. For more information, refer to the documentation. (string value)
#instance_usage_audit_period = month
instance_usage_audit_period = blah blah blah
test = valuetest
[TestSection]
things = stuff
- name: test
hosts: localhost
connection: local
gather_facts: false
tasks:
- config_template:
src: input.ini
dest: output.ini
config_overrides:
DEFAULT:
test: valuetest
password_length: 100
instance_usage_audit_period: blah blah blah
TestSection:
things: stuff
config_type: ini
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment