-
Notifications
You must be signed in to change notification settings - Fork 23.7k
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
Move away from eval #30650
Move away from eval #30650
Conversation
lib/ansible/config/base.yml
Outdated
@@ -1255,7 +1255,7 @@ INVENTORY_ENABLED: | |||
type: list | |||
INVENTORY_IGNORE_EXTS: | |||
name: Inventory ignore extensions | |||
default: eval(BLACKLIST_EXTS + ( '~', '.orig', '.ini', '.cfg', '.retry')) | |||
default: "{{(BLACKLIST_EXTS + ( '~', '.orig', '.ini', '.cfg', '.retry'))|list}}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: piping to list probably isn't needed (it's what literal_eval will do)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would get tuple
57192d4
to
8e94348
Compare
shipit |
Do we want to cherry-pick this so that 2.4.x has jinja2 in the config syntax? |
Cherry-picked for 2.4.1. |
SUMMARY
use templating + literal_eval as a 'nicer' dynamic default config
ISSUE TYPE
COMPONENT NAME
configuration
ANSIBLE VERSION