Repository: ansible/ansible

Issue:
cron module: Add mailto parameter
This patch adds a mailto parameter to the cron module. It has been tested on Debian with both crontabs and separate cron files.



Discussion:
1.Ticket #4584, adding env variables, is a more general version of this PR.
1a.This PR was requested to change its implementation to not hard-code. 
2.I had not been aware that crontab could include environment setting lines! I can't find info on any implementations that don't support it but perhaps my Google-fu is not good. 
http://man7.org/linux/man-pages/man5/crontab.5.html
2b.To avoid the extra line, of course one may export inside one's script.
http://stackoverflow.com/questions/2229825/where-can-i-set-environment-variables-that-crontab-will-use

Hi!

Thanks very much for your interest in Ansible.  It sincerely means a lot to us. 

On September 26, 2014, due to enormous levels of contribution to the project Ansible decided to reorganize module repos, making it easier
for developers to work on the project and for us to more easily manage new contributions and tickets.

We split modules from the main project off into two repos, http://github.com/ansible/ansible-modules-core and http://github.com/ansible/ansible-modules-extras

If you still would like this pull request merged, we will need your help making this target the new repo.  If you do not take any action, this
pull request unfortunately cannot be applied.

We apologize that we are not able to make this transition happen seamlessly, though this is a one-time change and your help is greatly appreciated -- 
this will greatly improve velocity going forward.

Both sets of modules will ship with Ansible, though they'll receive slightly different ticket handling.

To locate where a module lives between 'core' and 'extras'
- Find the module at http://docs.ansible.com/list_of_all_modules.html
- Open the documentation page for that module
- If the bottom of the docs say "This is an extras module", submit your ticket to https://github.com/ansible/ansible-modules-extras
- Otherwise, submit your pull request to update the existing module to https://github.com/ansible/ansible-modules-core
- Note that python modules in ansible now also end in ".py" and this extension is required for new contributions.
- action_plugins (modules with server side components) still live in the main repo.  If your pull request touches both, which should be
   exceedingly rare, submit two new pull requests and make sure to mention the links to each other in the comments.

Otherwise, if this is a new module:
- Submit your pull request to add a module to https://github.com/ansible/ansible-modules-extras

It may be possible to re-patriate your pull requests automatically, one user-submitted approach for advanced git users
has been suggested at https://gist.github.com/willthames/afbaaab0c9681ed45619

Additionally, should you need more help with this, you can ask questions on:
- the development mailing list: https://groups.google.com/forum/#!forum/ansible-devel

Thank you very much!

This ticket should probably remain closed. On the new repo, I mentioned it at ; 
https://github.com/ansible/ansible-modules-core/issues/50


Resolving patch:
diff --git a/lib/ansible/modules/cloud/docker/docker_login.py b/lib/ansible/modules/cloud/docker/docker_login.py
--- a/lib/ansible/modules/cloud/docker/docker_login.py
+++ b/lib/ansible/modules/cloud/docker/docker_login.py
@@ -318,8 +318,8 @@ def main():
         login_result={}
     )
 
-    if module.params['state'] == 'present' and module.params['registry_url'] == DEFAULT_DOCKER_REGISTRY and not module.params['email']:
-        module.fail_json(msg="'email' is required when loging into DockerHub")
+    if client.module.params['state'] == 'present' and client.module.params['registry_url'] == DEFAULT_DOCKER_REGISTRY and not client.module.params['email']:
+        client.module.fail_json(msg="'email' is required when logging into DockerHub")
 
     LoginManager(client, results)
     if 'actions' in results:


Test patch: