diff --git a/galaxy.yml b/galaxy.yml index f901c6dd..78b0d6cd 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -9,7 +9,7 @@ namespace: fortinet name: fortimanager # The version of the collection. Must be compatible with semantic versioning -version: 1.0.3 +version: 1.0.4 # The path to the Markdown (.md) readme file. This path is relative to the root of the collection readme: README.md @@ -46,7 +46,7 @@ tags: [fortinet, fortimanager, ansible] dependencies: {} # The URL of the originating SCM repository -repository: https://github.com/fortinet-ansible-dev/ansible-galaxy-fortimanager-collection/tree/galaxy/1.0.3 +repository: https://github.com/fortinet-ansible-dev/ansible-galaxy-fortimanager-collection/tree/galaxy/1.0.4 # The URL to any online docs documentation: https://ansible-galaxy-fortimanager-docs.readthedocs.io/en/galaxy-1.0.3 diff --git a/plugins/module_utils/common.py b/plugins/module_utils/common.py index e6024131..99df1cf4 100644 --- a/plugins/module_utils/common.py +++ b/plugins/module_utils/common.py @@ -297,11 +297,16 @@ def _validate_param_recursivly(self, param, schema): return True, '' if schema['type'] == 'string': + param_value = str(param_value) if not isinstance(param_value, str): return self._report_schema_violation(param, schema, 'type mismatch') if 'enum' in schema and param_value not in schema['enum']: return self._report_schema_violation(param, schema, 'enum value mismatch') elif schema['type'] == 'integer': + try: + param_value = int(param_value) + except ValueError: + pass if not isinstance(param_value, int): return self._report_schema_violation(param, schema, 'type mismatch') if 'enum' in schema and param_value not in schema['enum']: