diff --git a/changelogs/fragments/154-template-param-support.yaml b/changelogs/fragments/154-template-param-support.yaml new file mode 100644 index 00000000..e77342c3 --- /dev/null +++ b/changelogs/fragments/154-template-param-support.yaml @@ -0,0 +1,3 @@ +--- +bugfixes: + - support the ``template`` param in all collections depending on kubernetes.core (https://github.com/ansible-collections/kubernetes.core/pull/154). diff --git a/molecule/default/tasks/template.yml b/molecule/default/tasks/template.yml index d7cba2dc..13246c37 100644 --- a/molecule/default/tasks/template.yml +++ b/molecule/default/tasks/template.yml @@ -22,7 +22,7 @@ assert: that: - r.failed - - "'is only supported parameter for' in r.msg" + - "'is only a supported parameter for' in r.msg" - name: Specify both definition and template kubernetes.core.k8s: diff --git a/plugins/action/k8s_info.py b/plugins/action/k8s_info.py index f36cdb12..e214825c 100644 --- a/plugins/action/k8s_info.py +++ b/plugins/action/k8s_info.py @@ -126,8 +126,8 @@ class ActionModule(ActionBase): def load_template(self, template, new_module_args, task_vars): # template is only supported by k8s module. - if self._task.action not in ('k8s', 'kubernetes.core.k8s', 'community.okd.k8s'): - raise AnsibleActionFail("'template' is only supported parameter for 'k8s' module.") + if self._task.action not in ('k8s', 'kubernetes.core.k8s', 'community.okd.k8s', 'redhat.openshift.k8s', 'community.kubernetes.k8s'): + raise AnsibleActionFail("'template' is only a supported parameter for the 'k8s' module.") template_params = [] if isinstance(template, string_types) or isinstance(template, dict):