diff --git a/lib/ansible/module_utils/csharp/Ansible.Basic.cs b/lib/ansible/module_utils/csharp/Ansible.Basic.cs index ed21d22896..f6ecb08ea1 100644 --- a/lib/ansible/module_utils/csharp/Ansible.Basic.cs +++ b/lib/ansible/module_utils/csharp/Ansible.Basic.cs @@ -242,7 +242,7 @@ namespace Ansible.Basic public void Deprecate(string message, string version) { - deprecations.Add(new Dictionary() { { "message", message }, { "version", version } }); + deprecations.Add(new Dictionary() { { "msg", message }, { "version", version } }); LogEvent(String.Format("[DEPRECATION WARNING] {0} {1}", message, version)); } diff --git a/test/integration/targets/win_csharp_utils/library/ansible_basic_tests.ps1 b/test/integration/targets/win_csharp_utils/library/ansible_basic_tests.ps1 index fe867fe048..4487381eeb 100644 --- a/test/integration/targets/win_csharp_utils/library/ansible_basic_tests.ps1 +++ b/test/integration/targets/win_csharp_utils/library/ansible_basic_tests.ps1 @@ -655,7 +655,7 @@ test_no_log - Invoked with: } deprecations = @( @{ - message = "Param 'removed1' is deprecated. See the module docs for more information" + msg = "Param 'removed1' is deprecated. See the module docs for more information" version = "2.1" } ) @@ -710,7 +710,7 @@ test_no_log - Invoked with: module_args = @{} } warnings = @("warning") - deprecations = @(@{message = "message"; version = "2.8"}) + deprecations = @(@{msg = "message"; version = "2.8"}) } $actual | Assert-DictionaryEquals -Expected $expected }