{"action":"closed","issue":{"url":"https://api.github.com/repos/ansible/ansible/issues/11675","labels_url":"https://api.github.com/repos/ansible/ansible/issues/11675/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible/issues/11675/comments","events_url":"https://api.github.com/repos/ansible/ansible/issues/11675/events","html_url":"https://github.com/ansible/ansible/issues/11675","id":96322248,"number":11675,"title":"replace module: TypeError: unhashable type: 'dict'","user":{"login":"Hubbitus","id":720349,"avatar_url":"https://avatars.githubusercontent.com/u/720349?v=3","gravatar_id":"","url":"https://api.github.com/users/Hubbitus","html_url":"https://github.com/Hubbitus","followers_url":"https://api.github.com/users/Hubbitus/followers","following_url":"https://api.github.com/users/Hubbitus/following{/other_user}","gists_url":"https://api.github.com/users/Hubbitus/gists{/gist_id}","starred_url":"https://api.github.com/users/Hubbitus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hubbitus/subscriptions","organizations_url":"https://api.github.com/users/Hubbitus/orgs","repos_url":"https://api.github.com/users/Hubbitus/repos","events_url":"https://api.github.com/users/Hubbitus/events{/privacy}","received_events_url":"https://api.github.com/users/Hubbitus/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ansible/ansible/labels/bug_report","name":"bug_report","color":"fbca04"},{"url":"https://api.github.com/repos/ansible/ansible/labels/P3","name":"P3","color":"fef2c0"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/ansible/ansible/milestones/5","html_url":"https://github.com/ansible/ansible/milestones/v2","labels_url":"https://api.github.com/repos/ansible/ansible/milestones/5/labels","id":975800,"number":5,"title":"v2","description":null,"creator":{"login":"bcoca","id":836171,"avatar_url":"https://avatars.githubusercontent.com/u/836171?v=3","gravatar_id":"","url":"https://api.github.com/users/bcoca","html_url":"https://github.com/bcoca","followers_url":"https://api.github.com/users/bcoca/followers","following_url":"https://api.github.com/users/bcoca/following{/other_user}","gists_url":"https://api.github.com/users/bcoca/gists{/gist_id}","starred_url":"https://api.github.com/users/bcoca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bcoca/subscriptions","organizations_url":"https://api.github.com/users/bcoca/orgs","repos_url":"https://api.github.com/users/bcoca/repos","events_url":"https://api.github.com/users/bcoca/events{/privacy}","received_events_url":"https://api.github.com/users/bcoca/received_events","type":"User","site_admin":false},"open_issues":77,"closed_issues":93,"state":"open","created_at":"2015-02-11T19:43:06Z","updated_at":"2015-07-21T15:31:32Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2015-07-21T14:00:02Z","updated_at":"2015-07-21T15:31:33Z","closed_at":"2015-07-21T15:31:32Z","body":"##### Issue Type:\r\n\r\nBug Report\r\n\r\n##### Ansible Version:\r\n\r\n```\r\n$ ansible --version\r\nansible 2.0.0\r\n  configured module search path = modules/\r\n```\r\n\r\nMaster 7124504ccfd837d6a8e4124d619fb605ae92e0b0\r\n\r\n##### Ansible Configuration:\r\n\r\nI hope nothing related to settings.\r\n\r\n##### Environment:\r\n\r\nFedora 22\r\n\r\n##### Summary:\r\n\r\n```\r\nfatal: [egais.perf.monitor]: FAILED! => {\r\n    \"changed\": false, \r\n    \"failed\": true, \r\n    \"msg\": \"One or more items failed\", \r\n    \"results\": [\r\n        {\r\n            \"ansible_notify\": [\r\n                \"restart httpd\"\r\n            ], \r\n            \"exception\": \"Traceback (most recent call last):\\n  File \\\"<stdin>\\\", line 1833, in <module>\\n  File \\\"<stdin>\\\", line 143, in main\\n  File \\\"/usr/lib64/python2.7/re.py\\\", line 190, in compile\\n    return _compile(pattern, flags)\\n  File \\\"/usr/lib64/python2.7/re.py\\\", line 229, in _compile\\n    p = _cache.get(cachekey)\\nTypeError: unhashable type: 'dict'\\n\", \r\n            \"failed\": true, \r\n            \"item\": {\r\n                \"regexp\": \"^(LoadModule .+(?<!mod_mpm_prefork)\\\\.so)\", \r\n                \"replace\": \"#\\\\1\"\r\n            }, \r\n            \"parsed\": false\r\n        }, \r\n        {\r\n            \"ansible_notify\": [\r\n                \"restart httpd\"\r\n            ], \r\n            \"exception\": \"Traceback (most recent call last):\\n  File \\\"<stdin>\\\", line 1833, in <module>\\n  File \\\"<stdin>\\\", line 143, in main\\n  File \\\"/usr/lib64/python2.7/re.py\\\", line 190, in compile\\n    return _compile(pattern, flags)\\n  File \\\"/usr/lib64/python2.7/re.py\\\", line 229, in _compile\\n    p = _cache.get(cachekey)\\nTypeError: unhashable type: 'dict'\\n\", \r\n            \"failed\": true, \r\n            \"item\": {\r\n                \"regexp\": \"^#\\\\s*(LoadModule .+mod_mpm_prefork\\\\.so)\", \r\n                \"replace\": \"\\\\1\"\r\n            }, \r\n            \"parsed\": false\r\n        }\r\n    ]\r\n}\r\n```\r\n\r\n##### Steps To Reproduce:\r\n\r\nTask:\r\n```\r\n- name: Ensure non-threaded prefork used\r\n  replace:\r\n    dest: /etc/httpd/conf.modules.d/00-mpm.conf\r\n    regexp: \"{{item}}\"\r\n    replace: \"^{{item}}$\"\r\n  with_items:\r\n    - { regexp: '^(LoadModule .+(?<!mod_mpm_prefork)\\.so)', replace: '#\\1' }\r\n    - { regexp: '^#\\s*(LoadModule .+mod_mpm_prefork\\.so)', replace: '\\1' }\r\n```\r\n\r\n##### Expected Results:\r\n\r\nIn file:\r\nhttp://pkgs.fedoraproject.org/cgit/httpd.git/tree/00-mpm.conf\r\n\r\nCommented all LoadModule directives except mod_mpm_prefork.so\r\n\r\n##### Actual Results:\r\n\r\nFail in module"}}