Support nonetype trivial default - #5
Merged
Merged
Conversation
This was referenced Feb 11, 2026
slothkong
force-pushed
the
support-nonetype-trivial-default
branch
from
February 13, 2026 14:29
72c5bd9 to
cc31f2a
Compare
github-actions Bot
pushed a commit
that referenced
this pull request
Feb 13, 2026
## [1.5.2](1.5.1...1.5.2) (2026-02-13) ### Bug Fixes * Support nonetype trivial default ([#5](#5)) ([b7b873f](b7b873f))
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is done to align with the precedence set by CLI tools like
Terraform/OpenTofu, where settingnull(conceptual equivalent ofNone) is needed to avoid the complexity of dealing with trivial default for values with a complex structure (i.e. dictionaries containing sub dictionaries, lists of dictionaries, etc.)IMPORTANT: The
ansible.builtin.assertstatements used for input validation must continue allowing empty string ('') as a synonym ofnull. This is a technical limitation of thevar_promptstatements we used on Ansible Playbooks that import this Ansible Role.To be clear , at the time of writing, when an Ansible Playbook runs
var_promptand asks for an optional input , users have the option to press enter to skip, indicating they want to set the trivial default value. If users do press enter to skip,var_promptset the corresponding variable as a emptystr, NOT as anoneType. Hence the Ansible Role needs to deal with both as if they were equivalent. The same is true for the literal string containing the wordNone, which is set the the Ansible Playbook if run in non-interactive mode while ommitting the variable upon running Ansible.cc: @pacospace