diff --git a/lib/ansible/modules/network/iosxr/iosxr_config.py b/lib/ansible/modules/network/iosxr/iosxr_config.py index 0dc6984fc48..15978ff108b 100644 --- a/lib/ansible/modules/network/iosxr/iosxr_config.py +++ b/lib/ansible/modules/network/iosxr/iosxr_config.py @@ -194,6 +194,9 @@ DEFAULT_COMMIT_COMMENT = 'configured by iosxr_config' def check_args(module, warnings): + if module.params['comment']: + if len(module.params['comment']) > 60: + module.fail_json(msg='comment argument cannot be more than 60 characters') if module.params['force']: warnings.append('The force argument is deprecated, please use ' 'match=none instead. This argument will be '