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

Move away from eval #30650

Merged
merged 1 commit into from
Sep 21, 2017
Merged

Move away from eval #30650

merged 1 commit into from
Sep 21, 2017

Conversation

bcoca
Copy link
Member

@bcoca bcoca commented Sep 20, 2017

SUMMARY

use templating + literal_eval as a 'nicer' dynamic default config

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

configuration

ANSIBLE VERSION
2.4/2.5

@ansibot ansibot added affects_2.5 This issue/PR affects Ansible v2.5 bugfix_pull_request constants needs_triage Needs a first human triage before being processed. support:core This issue/PR relates to code supported by the Ansible Engineering Team. labels Sep 20, 2017
@@ -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}}"
Copy link
Contributor

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)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would get tuple

@bcoca bcoca removed the needs_triage Needs a first human triage before being processed. label Sep 20, 2017
@abadger
Copy link
Contributor

abadger commented Sep 21, 2017

shipit

@bcoca bcoca merged commit f12c6e0 into ansible:devel Sep 21, 2017
@bcoca bcoca deleted the move_away_from_eval branch September 21, 2017 01:35
@abadger
Copy link
Contributor

abadger commented Sep 21, 2017

Do we want to cherry-pick this so that 2.4.x has jinja2 in the config syntax?

@abadger
Copy link
Contributor

abadger commented Sep 21, 2017

Cherry-picked for 2.4.1.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.5 This issue/PR affects Ansible v2.5 bug This issue/PR relates to a bug. constants support:core This issue/PR relates to code supported by the Ansible Engineering Team.
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants