{"action":"closed","issue":{"url":"https://api.github.com/repos/ansible/ansible/issues/41536","repository_url":"https://api.github.com/repos/ansible/ansible","labels_url":"https://api.github.com/repos/ansible/ansible/issues/41536/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible/issues/41536/comments","events_url":"https://api.github.com/repos/ansible/ansible/issues/41536/events","html_url":"https://github.com/ansible/ansible/issues/41536","id":332373508,"node_id":"MDU6SXNzdWUzMzIzNzM1MDg=","number":41536,"title":"Typo in win_domain module","user":{"login":"lfrancke","id":122850,"node_id":"MDQ6VXNlcjEyMjg1MA==","avatar_url":"https://avatars2.githubusercontent.com/u/122850?v=4","gravatar_id":"","url":"https://api.github.com/users/lfrancke","html_url":"https://github.com/lfrancke","followers_url":"https://api.github.com/users/lfrancke/followers","following_url":"https://api.github.com/users/lfrancke/following{/other_user}","gists_url":"https://api.github.com/users/lfrancke/gists{/gist_id}","starred_url":"https://api.github.com/users/lfrancke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lfrancke/subscriptions","organizations_url":"https://api.github.com/users/lfrancke/orgs","repos_url":"https://api.github.com/users/lfrancke/repos","events_url":"https://api.github.com/users/lfrancke/events{/privacy}","received_events_url":"https://api.github.com/users/lfrancke/received_events","type":"User","site_admin":false},"labels":[{"id":686214011,"node_id":"MDU6TGFiZWw2ODYyMTQwMTE=","url":"https://api.github.com/repos/ansible/ansible/labels/affects_2.5","name":"affects_2.5","color":"ededed","default":false},{"id":785271699,"node_id":"MDU6TGFiZWw3ODUyNzE2OTk=","url":"https://api.github.com/repos/ansible/ansible/labels/bug","name":"bug","color":"fbca04","default":true},{"id":814251818,"node_id":"MDU6TGFiZWw4MTQyNTE4MTg=","url":"https://api.github.com/repos/ansible/ansible/labels/has_pr","name":"has_pr","color":"1d76db","default":false},{"id":496359346,"node_id":"MDU6TGFiZWw0OTYzNTkzNDY=","url":"https://api.github.com/repos/ansible/ansible/labels/module","name":"module","color":"1d76db","default":false},{"id":636352796,"node_id":"MDU6TGFiZWw2MzYzNTI3OTY=","url":"https://api.github.com/repos/ansible/ansible/labels/support:core","name":"support:core","color":"ededed","default":false},{"id":108461331,"node_id":"MDU6TGFiZWwxMDg0NjEzMzE=","url":"https://api.github.com/repos/ansible/ansible/labels/windows","name":"windows","color":"777777","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-06-14T12:07:02Z","updated_at":"2018-06-27T01:29:46Z","closed_at":"2018-06-27T01:29:46Z","author_association":"CONTRIBUTOR","body":"##### SUMMARY\r\nAs also reported in this [thread](https://groups.google.com/forum/?hl=no#!topic/ansible-project/FDODw6B8njY) running the win_domain module a second time fails due to a typo in the module.\r\n\r\n##### ISSUE TYPE\r\n - Bug Report\r\n\r\n##### COMPONENT NAME\r\nwin_domain\r\n\r\n##### ANSIBLE VERSION\r\n```\r\nansible 2.5.4\r\n  config file = /Users/lars/.ansible.cfg\r\n  configured module search path = [u'/Users/lars/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']\r\n  ansible python module location = /usr/local/Cellar/ansible/2.5.4/libexec/lib/python2.7/site-packages/ansible\r\n  executable location = /usr/local/bin/ansible\r\n  python version = 2.7.15 (default, May  1 2018, 16:44:14) [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)]\r\n```\r\n\r\n##### CONFIGURATION\r\n\r\n##### OS / ENVIRONMENT\r\nWindows Server 2016 is the target\r\n\r\n##### STEPS TO REPRODUCE\r\n```yaml\r\n- name: Ensure domain exists\r\n  register: domain_result\r\n  win_domain:\r\n    dns_domain_name: opencore.com\r\n    safe_mode_password: foobar\r\n```\r\n\r\nThen run two times.\r\n\r\n##### EXPECTED RESULTS\r\nI expect it to work not only on the first but also on subsequent runs\r\n\r\n##### ACTUAL RESULTS\r\n<!--- What actually happened? If possible run with extra verbosity (-vvvv) -->\r\n\r\n<!--- Paste verbatim command output between quotes below -->\r\n```\r\nfatal: [ad]: FAILED! => {\"changed\": false, \"module_stderr\": \"Exception calling \\\"Run\\\" with \\\"1\\\" argument(s): \\\"Exception calling \\\"Invoke\\\" with \\\"0\\\" argument(s): \\\"The running command \\r\\nstopped because the preference variable \\\"ErrorActionPreference\\\" or common parameter is set to Stop: The specified \\r\\nargument 'InstallDNS' was not recognized.\\r\\n\\\"\\\"\\r\\nAt line:65 char:5\\r\\n+     $output = $entrypoint.Run($payload)\\r\\n+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\r\\n    + CategoryInfo          : NotSpecified: (:) [], ParentContainsErrorRecordException\\r\\n    + FullyQualifiedErrorId : ScriptMethodRuntimeException\\r\\n \\r\\n\", \"module_stdout\": \"\", \"msg\": \"MODULE FAILURE\", \"rc\": 1}\r\n```\r\n\r\nThe problem seems to be this https://github.com/ansible/ansible/blob/v2.5.4/lib/ansible/modules/windows/win_domain.ps1#L74 where it says _InstallDNS_ it should say _InstallDns_ according to this documentation: https://docs.microsoft.com/en-us/powershell/module/addsdeployment/install-addsforest?view=win10-ps\r\n\r\nI also checked in devel and the issue is the same\r\n"}}
{"actor":{"display_login":"jborean93"}}