Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: migrate to dynaconf to handle multi-source configuration #708

Merged
merged 6 commits into from
Jun 7, 2024

Conversation

xoxys
Copy link
Member

@xoxys xoxys commented Jun 4, 2024

BREAKING CHANGE: With the migration to a new configuration framework, we have also restructured the configuration file and environment variables. Please check the documentation before you upgrade.

New config layout:

---
# Default is the current working directory.
base_dir:

role:
  # Default is the basename of 'role_name'.
  name:
  # Auto-detect if the given directory is a role, can be disabled
  # to parse loose files instead.
  autodetct: True

# Don't write anything to file system
dry_run: False

exclude_files: []
# Examples
# exclude_files:
#   - molecule/
#   - files/**/*.py

# Exclude tags from automatic detection. Configured tags are only skipped
# if the tag is not used in an annotation.
exclude_tags: []

logging:
  # Possible options debug | info | warning | error | critical
  level: "warning"
  # Json logging can be enabled if a parsable output is required
  json: False

template:
  name: readme
  # Default is built-in templates directory.
  src:

  options:
    # Configures whether to tabulate variables in the output. When set to `True`,
    # variables will be displayed in a tabular format intsead of plain marktdown sections.
    # NOTE: This option does not support rendering multiline code blocks.
    tabulate_vars: False

renderer:
  # By default, double spaces, spaces before and after line breaks or tab characters, etc.
  # are automatically removed before the template is rendered. As a result, indenting
  # with spaces does not work. If you want to use spaces to indent text, you must disable
  # this option.
  autotrim: True
  # Load custom header from given file and append template output to it before write.
  include_header: ""
  # Path to write rendered template file. Default is the current working directory.
  dest:
  # Don't ask to overwrite if output file exists.
  force_overwrite: False

@xoxys xoxys merged commit 8e042c7 into main Jun 7, 2024
5 checks passed
@xoxys xoxys deleted the use-dynaconf branch June 11, 2024 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant