{"action":"closed","number":5151,"pull_request":{"url":"https://api.github.com/repos/ansible/ansible-modules-core/pulls/5151","id":87908166,"html_url":"https://github.com/ansible/ansible-modules-core/pull/5151","diff_url":"https://github.com/ansible/ansible-modules-core/pull/5151.diff","patch_url":"https://github.com/ansible/ansible-modules-core/pull/5151.patch","issue_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/5151","number":5151,"state":"closed","locked":false,"title":"5150 Cron module: Move job parameter to meet expected requirements","user":{"login":"StevendeVries","id":6906996,"avatar_url":"https://avatars.githubusercontent.com/u/6906996?v=3","gravatar_id":"","url":"https://api.github.com/users/StevendeVries","html_url":"https://github.com/StevendeVries","followers_url":"https://api.github.com/users/StevendeVries/followers","following_url":"https://api.github.com/users/StevendeVries/following{/other_user}","gists_url":"https://api.github.com/users/StevendeVries/gists{/gist_id}","starred_url":"https://api.github.com/users/StevendeVries/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StevendeVries/subscriptions","organizations_url":"https://api.github.com/users/StevendeVries/orgs","repos_url":"https://api.github.com/users/StevendeVries/repos","events_url":"https://api.github.com/users/StevendeVries/events{/privacy}","received_events_url":"https://api.github.com/users/StevendeVries/received_events","type":"User","site_admin":false},"body":"##### ISSUE TYPE\r\n<!--- Pick one below and delete the rest: -->\r\n - Bugfix Pull Request\r\n\r\n##### COMPONENT NAME\r\n<!--- Name of the plugin/module/task -->\r\nCron\r\n\r\nDetails in #5150 :\r\n##### ANSIBLE VERSION\r\n<!--- Paste verbatim output from “ansible --version” between quotes below -->\r\n```\r\nansible 2.1.2.0\r\n  config file = /Users/stevendevries/somewhere/ansible/ansible.cfg\r\n  configured module search path = Default w/o overrides\r\n```\r\n\r\n##### CONFIGURATION\r\n<!---\r\nMention any settings you have changed/added/removed in ansible.cfg\r\n(or using the ANSIBLE_* environment variables).\r\n-->\r\n\r\n##### OS / ENVIRONMENT\r\n<!---\r\nMention the OS you are running Ansible from, and the OS you are\r\nmanaging, or say “N/A” for anything that is not platform-specific.\r\n-->\r\nN/A\r\n##### SUMMARY\r\n<!--- Explain the problem briefly -->\r\nI want to make sure an old cronjob is not present anymore, using the following task:\r\n```\r\n- name: Make sure an old cronjob is not present anymore\r\n  cron: name=\"aws_scripts_mon\" user=\"{{ ansible_user }}\" state=absent\r\n```\r\nThis works fine with Ansible 2.1.1.0 after updating to 2.1.2.0 this breaks.\r\n\r\n##### STEPS TO REPRODUCE\r\n<!---\r\nFor bugs, show exactly how to reproduce the problem.\r\nFor new features, show how the feature would be used.\r\n-->\r\nRun this task and it fails:\r\n<!--- Paste example playbooks or commands between quotes below -->\r\n```\r\n- name: Make sure an old cronjob is not present anymore\r\n  cron: name=\"aws_scripts_mon\" user=\"{{ ansible_user }}\" state=absent\r\n```\r\nRun this task and it works (just a random string in job parameter)\r\n```\r\n- name: Make sure an old cronjob is not present anymore\r\n  cron: name=\"aws_scripts_mon\" job=\"something\" user=\"{{ ansible_user }}\" state=absent\r\n```\r\n\r\n##### EXPECTED RESULTS\r\n<!--- What did you expect to happen when running the steps above? -->\r\nI should work without a job parameter.\r\n\r\n##### ACTUAL RESULTS\r\n```\r\nTASK [aws : Make sure an old cronjob is not present anymore] *******************\r\ntask path: /srv/http/mmim-leveranciersportaal/ansible/roles/aws/tasks/main.yml:43\r\nAn exception occurred during task execution. To see the full traceback, use -vvv. The error was: AttributeError: 'NoneType' object has no attribute 'strip'\r\nfatal: [somewhere]: FAILED! => {\"changed\": false, \"failed\": true, \"module_stderr\": \"Traceback (most recent call last):\\n  File \\\"/tmp/ansible_yPdq_U/ansible_module_cron.py\\\", line 700, in <module>\\n    main()\\n  File \\\"/tmp/ansible_yPdq_U/ansible_module_cron.py\\\", line 645, in main\\n    job = crontab.get_cron_job(minute, hour, day, month, weekday, job, special_time, disabled)\\n  File \\\"/tmp/ansible_yPdq_U/ansible_module_cron.py\\\", line 385, in get_cron_job\\n    job = job.strip('\\\\r\\\\n')\\nAttributeError: 'NoneType' object has no attribute 'strip'\\n\", \"module_stdout\": \"\", \"msg\": \"MODULE FAILURE\"}\r\n```","created_at":"2016-10-04T14:43:06Z","updated_at":"2016-10-17T15:53:08Z","closed_at":"2016-10-17T15:53:07Z","merged_at":"2016-10-17T15:53:07Z","merge_commit_sha":"4900632342b981c6b04e934a148e4109b2666c23","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/ansible/ansible-modules-core/pulls/5151/commits","review_comments_url":"https://api.github.com/repos/ansible/ansible-modules-core/pulls/5151/comments","review_comment_url":"https://api.github.com/repos/ansible/ansible-modules-core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/5151/comments","statuses_url":"https://api.github.com/repos/ansible/ansible-modules-core/statuses/c4983d1d6dfed0572e7b8e66741d04d8b98603af","head":{"label":"StevendeVries:issue/5150","ref":"issue/5150","sha":"c4983d1d6dfed0572e7b8e66741d04d8b98603af","user":{"login":"StevendeVries","id":6906996,"avatar_url":"https://avatars.githubusercontent.com/u/6906996?v=3","gravatar_id":"","url":"https://api.github.com/users/StevendeVries","html_url":"https://github.com/StevendeVries","followers_url":"https://api.github.com/users/StevendeVries/followers","following_url":"https://api.github.com/users/StevendeVries/following{/other_user}","gists_url":"https://api.github.com/users/StevendeVries/gists{/gist_id}","starred_url":"https://api.github.com/users/StevendeVries/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StevendeVries/subscriptions","organizations_url":"https://api.github.com/users/StevendeVries/orgs","repos_url":"https://api.github.com/users/StevendeVries/repos","events_url":"https://api.github.com/users/StevendeVries/events{/privacy}","received_events_url":"https://api.github.com/users/StevendeVries/received_events","type":"User","site_admin":false},"repo":{"id":69973410,"name":"ansible-modules-core","full_name":"StevendeVries/ansible-modules-core","owner":{"login":"StevendeVries","id":6906996,"avatar_url":"https://avatars.githubusercontent.com/u/6906996?v=3","gravatar_id":"","url":"https://api.github.com/users/StevendeVries","html_url":"https://github.com/StevendeVries","followers_url":"https://api.github.com/users/StevendeVries/followers","following_url":"https://api.github.com/users/StevendeVries/following{/other_user}","gists_url":"https://api.github.com/users/StevendeVries/gists{/gist_id}","starred_url":"https://api.github.com/users/StevendeVries/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StevendeVries/subscriptions","organizations_url":"https://api.github.com/users/StevendeVries/orgs","repos_url":"https://api.github.com/users/StevendeVries/repos","events_url":"https://api.github.com/users/StevendeVries/events{/privacy}","received_events_url":"https://api.github.com/users/StevendeVries/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/StevendeVries/ansible-modules-core","description":"Ansible modules - these modules ship with ansible","fork":true,"url":"https://api.github.com/repos/StevendeVries/ansible-modules-core","forks_url":"https://api.github.com/repos/StevendeVries/ansible-modules-core/forks","keys_url":"https://api.github.com/repos/StevendeVries/ansible-modules-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/StevendeVries/ansible-modules-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/StevendeVries/ansible-modules-core/teams","hooks_url":"https://api.github.com/repos/StevendeVries/ansible-modules-core/hooks","issue_events_url":"https://api.github.com/repos/StevendeVries/ansible-modules-core/issues/events{/number}","events_url":"https://api.github.com/repos/StevendeVries/ansible-modules-core/events","assignees_url":"https://api.github.com/repos/StevendeVries/ansible-modules-core/assignees{/user}","branches_url":"https://api.github.com/repos/StevendeVries/ansible-modules-core/branches{/branch}","tags_url":"https://api.github.com/repos/StevendeVries/ansible-modules-core/tags","blobs_url":"https://api.github.com/repos/StevendeVries/ansible-modules-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/StevendeVries/ansible-modules-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/StevendeVries/ansible-modules-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/StevendeVries/ansible-modules-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/StevendeVries/ansible-modules-core/statuses/{sha}","languages_url":"https://api.github.com/repos/StevendeVries/ansible-modules-core/languages","stargazers_url":"https://api.github.com/repos/StevendeVries/ansible-modules-core/stargazers","contributors_url":"https://api.github.com/repos/StevendeVries/ansible-modules-core/contributors","subscribers_url":"https://api.github.com/repos/StevendeVries/ansible-modules-core/subscribers","subscription_url":"https://api.github.com/repos/StevendeVries/ansible-modules-core/subscription","commits_url":"https://api.github.com/repos/StevendeVries/ansible-modules-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/StevendeVries/ansible-modules-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/StevendeVries/ansible-modules-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/StevendeVries/ansible-modules-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/StevendeVries/ansible-modules-core/contents/{+path}","compare_url":"https://api.github.com/repos/StevendeVries/ansible-modules-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/StevendeVries/ansible-modules-core/merges","archive_url":"https://api.github.com/repos/StevendeVries/ansible-modules-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/StevendeVries/ansible-modules-core/downloads","issues_url":"https://api.github.com/repos/StevendeVries/ansible-modules-core/issues{/number}","pulls_url":"https://api.github.com/repos/StevendeVries/ansible-modules-core/pulls{/number}","milestones_url":"https://api.github.com/repos/StevendeVries/ansible-modules-core/milestones{/number}","notifications_url":"https://api.github.com/repos/StevendeVries/ansible-modules-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/StevendeVries/ansible-modules-core/labels{/name}","releases_url":"https://api.github.com/repos/StevendeVries/ansible-modules-core/releases{/id}","deployments_url":"https://api.github.com/repos/StevendeVries/ansible-modules-core/deployments","created_at":"2016-10-04T14:31:41Z","updated_at":"2016-10-04T14:31:44Z","pushed_at":"2016-10-04T14:40:29Z","git_url":"git://github.com/StevendeVries/ansible-modules-core.git","ssh_url":"git@github.com:StevendeVries/ansible-modules-core.git","clone_url":"https://github.com/StevendeVries/ansible-modules-core.git","svn_url":"https://github.com/StevendeVries/ansible-modules-core","homepage":"","size":10668,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"devel"}},"base":{"label":"ansible:devel","ref":"devel","sha":"0ee774ff150b8c9b2fb6a0273737f4ebd3c10dcd","user":{"login":"ansible","id":1507452,"avatar_url":"https://avatars.githubusercontent.com/u/1507452?v=3","gravatar_id":"","url":"https://api.github.com/users/ansible","html_url":"https://github.com/ansible","followers_url":"https://api.github.com/users/ansible/followers","following_url":"https://api.github.com/users/ansible/following{/other_user}","gists_url":"https://api.github.com/users/ansible/gists{/gist_id}","starred_url":"https://api.github.com/users/ansible/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ansible/subscriptions","organizations_url":"https://api.github.com/users/ansible/orgs","repos_url":"https://api.github.com/users/ansible/repos","events_url":"https://api.github.com/users/ansible/events{/privacy}","received_events_url":"https://api.github.com/users/ansible/received_events","type":"Organization","site_admin":false},"repo":{"id":24474126,"name":"ansible-modules-core","full_name":"ansible/ansible-modules-core","owner":{"login":"ansible","id":1507452,"avatar_url":"https://avatars.githubusercontent.com/u/1507452?v=3","gravatar_id":"","url":"https://api.github.com/users/ansible","html_url":"https://github.com/ansible","followers_url":"https://api.github.com/users/ansible/followers","following_url":"https://api.github.com/users/ansible/following{/other_user}","gists_url":"https://api.github.com/users/ansible/gists{/gist_id}","starred_url":"https://api.github.com/users/ansible/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ansible/subscriptions","organizations_url":"https://api.github.com/users/ansible/orgs","repos_url":"https://api.github.com/users/ansible/repos","events_url":"https://api.github.com/users/ansible/events{/privacy}","received_events_url":"https://api.github.com/users/ansible/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ansible/ansible-modules-core","description":"Ansible modules - these modules ship with ansible","fork":false,"url":"https://api.github.com/repos/ansible/ansible-modules-core","forks_url":"https://api.github.com/repos/ansible/ansible-modules-core/forks","keys_url":"https://api.github.com/repos/ansible/ansible-modules-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ansible/ansible-modules-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ansible/ansible-modules-core/teams","hooks_url":"https://api.github.com/repos/ansible/ansible-modules-core/hooks","issue_events_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/events{/number}","events_url":"https://api.github.com/repos/ansible/ansible-modules-core/events","assignees_url":"https://api.github.com/repos/ansible/ansible-modules-core/assignees{/user}","branches_url":"https://api.github.com/repos/ansible/ansible-modules-core/branches{/branch}","tags_url":"https://api.github.com/repos/ansible/ansible-modules-core/tags","blobs_url":"https://api.github.com/repos/ansible/ansible-modules-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ansible/ansible-modules-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ansible/ansible-modules-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/ansible/ansible-modules-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ansible/ansible-modules-core/statuses/{sha}","languages_url":"https://api.github.com/repos/ansible/ansible-modules-core/languages","stargazers_url":"https://api.github.com/repos/ansible/ansible-modules-core/stargazers","contributors_url":"https://api.github.com/repos/ansible/ansible-modules-core/contributors","subscribers_url":"https://api.github.com/repos/ansible/ansible-modules-core/subscribers","subscription_url":"https://api.github.com/repos/ansible/ansible-modules-core/subscription","commits_url":"https://api.github.com/repos/ansible/ansible-modules-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/ansible/ansible-modules-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/ansible/ansible-modules-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/ansible/ansible-modules-core/contents/{+path}","compare_url":"https://api.github.com/repos/ansible/ansible-modules-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ansible/ansible-modules-core/merges","archive_url":"https://api.github.com/repos/ansible/ansible-modules-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ansible/ansible-modules-core/downloads","issues_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues{/number}","pulls_url":"https://api.github.com/repos/ansible/ansible-modules-core/pulls{/number}","milestones_url":"https://api.github.com/repos/ansible/ansible-modules-core/milestones{/number}","notifications_url":"https://api.github.com/repos/ansible/ansible-modules-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ansible/ansible-modules-core/labels{/name}","releases_url":"https://api.github.com/repos/ansible/ansible-modules-core/releases{/id}","deployments_url":"https://api.github.com/repos/ansible/ansible-modules-core/deployments","created_at":"2014-09-25T20:28:25Z","updated_at":"2016-10-17T02:57:12Z","pushed_at":"2016-10-17T15:53:07Z","git_url":"git://github.com/ansible/ansible-modules-core.git","ssh_url":"git@github.com:ansible/ansible-modules-core.git","clone_url":"https://github.com/ansible/ansible-modules-core.git","svn_url":"https://github.com/ansible/ansible-modules-core","homepage":"","size":20394,"stargazers_count":863,"watchers_count":863,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1915,"mirror_url":null,"open_issues_count":1166,"forks":1915,"open_issues":1166,"watchers":863,"default_branch":"devel"}},"_links":{"self":{"href":"https://api.github.com/repos/ansible/ansible-modules-core/pulls/5151"},"html":{"href":"https://github.com/ansible/ansible-modules-core/pull/5151"},"issue":{"href":"https://api.github.com/repos/ansible/ansible-modules-core/issues/5151"},"comments":{"href":"https://api.github.com/repos/ansible/ansible-modules-core/issues/5151/comments"},"review_comments":{"href":"https://api.github.com/repos/ansible/ansible-modules-core/pulls/5151/comments"},"review_comment":{"href":"https://api.github.com/repos/ansible/ansible-modules-core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ansible/ansible-modules-core/pulls/5151/commits"},"statuses":{"href":"https://api.github.com/repos/ansible/ansible-modules-core/statuses/c4983d1d6dfed0572e7b8e66741d04d8b98603af"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"resmo","id":23809,"avatar_url":"https://avatars.githubusercontent.com/u/23809?v=3","gravatar_id":"","url":"https://api.github.com/users/resmo","html_url":"https://github.com/resmo","followers_url":"https://api.github.com/users/resmo/followers","following_url":"https://api.github.com/users/resmo/following{/other_user}","gists_url":"https://api.github.com/users/resmo/gists{/gist_id}","starred_url":"https://api.github.com/users/resmo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/resmo/subscriptions","organizations_url":"https://api.github.com/users/resmo/orgs","repos_url":"https://api.github.com/users/resmo/repos","events_url":"https://api.github.com/users/resmo/events{/privacy}","received_events_url":"https://api.github.com/users/resmo/received_events","type":"User","site_admin":false},"comments":3,"review_comments":0,"commits":1,"additions":1,"deletions":1,"changed_files":1}}
{"actor":{"display_login":"resmo"}}