Skip to content

Commit 5e1d74a

Browse files
Zuulopenstack-gerrit
authored andcommitted
Merge "Drop backwards compatibility for template trusting"
2 parents 336ca83 + 505da7a commit 5e1d74a

File tree

3 files changed

+3
-28
lines changed

3 files changed

+3
-28
lines changed

kayobe/plugins/action/kolla_ansible_host_vars.py

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,7 @@
1313
# under the License.
1414

1515
from ansible.plugins.action import ActionBase
16-
17-
# TODO(dougszu): From Ansible 12 onwards we must explicitly trust templates.
18-
# Since this feature is not supported in previous releases, we define a
19-
# noop method here for backwards compatibility. This can be removed in the
20-
# G cycle.
21-
try:
22-
from ansible.template import trust_as_template
23-
except ImportError:
24-
def trust_as_template(template):
25-
return template
16+
from ansible.template import trust_as_template
2617

2718

2819
class ConfigError(Exception):

kayobe/plugins/action/merge_configs.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,7 @@
2424

2525
from ansible import constants
2626
from ansible.plugins import action
27-
# TODO(dougszu): From Ansible 12 onwards we must explicitly trust templates.
28-
# Since this feature is not supported in previous releases, we define a
29-
# noop method here for backwards compatibility. This can be removed in the
30-
# G cycle.
31-
try:
32-
from ansible.template import trust_as_template
33-
except ImportError:
34-
def trust_as_template(template):
35-
return template
27+
from ansible.template import trust_as_template
3628

3729
from io import StringIO
3830

kayobe/plugins/action/merge_yaml.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,7 @@
2727
from ansible import errors as ansible_errors
2828
from ansible.plugins import action
2929

30-
# TODO(dougszu): From Ansible 12 onwards we must explicitly trust templates.
31-
# Since this feature is not supported in previous releases, we define a
32-
# noop method here for backwards compatibility. This can be removed in the
33-
# G cycle.
34-
try:
35-
from ansible.template import trust_as_template
36-
except ImportError:
37-
def trust_as_template(template):
38-
return template
30+
from ansible.template import trust_as_template
3931

4032
DOCUMENTATION = '''
4133
---

0 commit comments

Comments
 (0)