Skip to content
This repository has been archived by the owner. It is now read-only.

Add couchdb_user module #222

Closed
wants to merge 14 commits into
base: devel
from

Conversation

Projects
None yet
8 participants
@mmoya
Copy link
Contributor

mmoya commented Jan 23, 2015

Add module for handling CouchDB users.

@mmoya mmoya force-pushed the mmoya:couchdb-user-module branch from 01992ea to 2059136 Jan 23, 2015

@bcoca bcoca added this to the next milestone Feb 26, 2015

@jimi-c jimi-c added P2 and removed P3 labels Mar 6, 2015

@bcoca bcoca removed this from the next milestone Mar 19, 2015

@bcoca bcoca removed the P2 label Mar 19, 2015

@gregdek

This comment has been minimized.

Copy link
Contributor

gregdek commented Jun 17, 2015

Thanks for submitting this module to Ansible Extras. Apologies that it’s taken a while to get your module reviewed.

To help facilitate reviews, we’ve broadened the number of people who can approve modules for inclusion into the Extras repository. The list of official reviewers can be found here:

https://github.com/ansible/ansible-modules-extras/blob/devel/REVIEWERS.md

Our new policy is that if a new module is reviewed and approved by at least two official module reviewers, the module will be approved for inclusion. We will be asking the community of reviewers to take a look at these modules on a regular basis.

To ensure that your module has the best chance of being approved, please double-check that you adhere to the Ansible module guidelines: http://docs.ansible.com/developing_modules.html#module-checklist

@robynbergeron

This comment has been minimized.

Copy link
Contributor

robynbergeron commented Sep 25, 2015

Adding new process. We will be evaluating all new module PRs according to this process, effective immediately.

Thanks for submitting this new module to Ansible Extras! This module is now in community review, a process that is open to all Ansible users. In order for this module to be approved, it must gain the following votes:

“works_for_me”: If you have tested the module thoroughly, including testing of all of the module’s options, and if the module works for you, please add “works_for_me” in the comments.

“passes_guidelines”: If you have gone through the module guidelines and the module meets all of the requirements, please add “passes_guidelines” in the comments. Guidelines are available here: http://docs.ansible.com/developing_modules.html#module-checklist

“needs_revision”: If the module fails to work for you, or if it doesn’t meet guidelines, please add “needs_revision” in the comments with details about what needs to be fixed.

When a module has both “works_for_me” and “passes_guidelines” tags, we will promote the module for inclusion in Ansible Extras. At this point, you will be expected to maintain the module by fixing bugs and evaluating pull requests in a timely manner.

Thanks again for submitting your Ansible module!

login_port=dict(default="5984"),

name=dict(required=True, aliases=['username']),
password=dict(required=False),

This comment has been minimized.

@resmo

resmo Mar 18, 2016

Member

please add no_log=True to secrets to make sure they won't be logged.

module = AnsibleModule(
argument_spec=dict(
login_user=dict(default=None),
login_password=dict(default=None),

This comment has been minimized.

@resmo

resmo Mar 18, 2016

Member

please add no_log=True to secrets to make sure they won't be logged.


from binascii import hexlify
from passlib.utils.pbkdf2 import pbkdf2
import requests

This comment has been minimized.

@resmo

resmo Mar 18, 2016

Member

There is a fetch_url helper for interaction with URL which doesn't depend on request (also for other methods as GET). https://github.com/ansible/ansible/blob/devel/lib/ansible/module_utils/urls.py.

If this is an option for you, since users may don't have requests installed.

short_description: Add or remove CouchDB users.
description:
- Add or remove CouchDB users from a remote host.
version_added: "0.x"

This comment has been minimized.

@resmo

resmo Mar 18, 2016

Member

you can set it to "2.1" for now, if you work with me, we will be able to merge it :)

description:
- name of the user to add or remove
required: true
default: null

This comment has been minimized.

@resmo

resmo Mar 18, 2016

Member

default: null should be removed if required: true (since you want user input, so there is no default)

default: null
password:
description:
- password of the user

This comment has been minimized.

@resmo

resmo Mar 18, 2016

Member

always add required: <true|false> if its false, also add a default e.g. default: null

- password of the user
roles:
description
- list of roles of the user

This comment has been minimized.

@resmo

resmo Mar 18, 2016

Member

always add required: <true|false> if its false, also add a default e.g. default: null

)

if any(credentials):
if not all(credentials):

This comment has been minimized.

@resmo

resmo Mar 18, 2016

Member

Its ok but I wanted to let you know there is a helper for arguments required together here https://github.com/ansible/ansible/blob/devel/lib/ansible/module_utils/basic.py#L512 e.g. look for required_together= in other modules how to use it if you like

login_user=dict(default=None),
login_password=dict(default=None),
login_host=dict(default="localhost"),
login_port=dict(default="5984"),

This comment has been minimized.

@resmo

resmo Mar 18, 2016

Member

considering type='int' and default=5984

@sivel

This comment has been minimized.

Copy link
Member

sivel commented Mar 18, 2016

============================================================================
couchdb_user
============================================================================
ERROR: Official Ansible modules must have a .py extension for python modules or a .ps1 for powershell modules
ERROR: DOCUMENTATION.options.roles: expected a dictionary
ERROR: version_added is not a valid version number: '0.x'
ERROR: No RETURN documentation provided
ERROR: requests import found, should use ansible.module_utils.urls instead
@gregdek

This comment has been minimized.

Copy link
Contributor

gregdek commented Mar 21, 2016

@mmoya A friendly reminder: this pull request has been marked as needing your action. If you still believe that this PR applies, and you intend to address the issues with this PR, just let us know in the PR itself and we will keep it open pending your changes.

@mmoya

This comment has been minimized.

Copy link
Contributor Author

mmoya commented Mar 31, 2016

Thanks everybody for the review. I'll address all the issues.

@gregdek

This comment has been minimized.

Copy link
Contributor

gregdek commented Apr 6, 2016

@mmoya Another friendly reminder: this pull request has been marked as needing your action. If you still believe that this PR applies, and you intend to address the issues with this PR, just let us know in the PR itself and we will keep it open. If we don't hear from you within another 14 days, we will close this pull request.

[This message brought to you by your friendly Ansibull-bot.]

@gregdek

This comment has been minimized.

Copy link
Contributor

gregdek commented Apr 21, 2016

@mmoya A friendly reminder: this pull request has been marked as needing your action. If you still believe that this PR applies, and you intend to address the issues with this PR, just let us know in the PR itself and we will keep it open pending your changes. When you do address the issues, please respond with ready_for_review in your comment, so that we can notify the maintainer.

[This message brought to you by your friendly Ansibull-bot.]

@gregdek

This comment has been minimized.

Copy link
Contributor

gregdek commented May 7, 2016

@mmoya Another friendly reminder: this pull request has been marked as needing your action. If you still believe that this PR applies, and you intend to address the issues with this PR, just let us know in the PR itself and we will keep it open. If you have addressed the issues and believe it's ready for review, please comment with the text "ready_for_review". If we don't hear from you within another 14 days, we will close this pull request.

[This message brought to you by your friendly Ansibull-bot.]

@gregdek

This comment has been minimized.

Copy link
Contributor

gregdek commented May 22, 2016

@mmoya A friendly reminder: this pull request has been marked as needing your action. If you still believe that this PR applies, and you intend to address the issues with this PR, just let us know in the PR itself and we will keep it open pending your changes. When you do address the issues, please respond with ready_for_review in your comment, so that we can notify the maintainer.

[This message brought to you by your friendly Ansibull-bot.]

@mmoya

This comment has been minimized.

Copy link
Contributor Author

mmoya commented May 24, 2016

Slowly progressing on this.

@mmoya mmoya force-pushed the mmoya:couchdb-user-module branch from 2059136 to d2847ee May 26, 2016

@mmoya

This comment has been minimized.

Copy link
Contributor Author

mmoya commented May 26, 2016

I added a lot of commit on top of the original commit for easing review. If this gets merge ready I'll squash everything.

@resmo and @sivel, thanks a lot for the previous review. Ansible has changed a lot since last time I wrote a module.

+ready_for_review

@gregdek

This comment has been minimized.

Copy link
Contributor

gregdek commented May 26, 2016

Thanks @mmoya for this new module. When this module receives 'shipit' comments from two community members and any 'needs_revision' comments have been resolved, we will mark for inclusion.

[This message brought to you by your friendly Ansibull-bot.]

@ansibot

This comment has been minimized.

Copy link

ansibot commented Dec 7, 2016

This repository has been locked. All new issues and pull requests should be filed in https://github.com/ansible/ansible

Please read through the repomerge page in the dev guide. The guide contains links to tools which automatically move your issue or pull request to the ansible/ansible repo.

1 similar comment
@ansibot

This comment has been minimized.

Copy link

ansibot commented Apr 11, 2017

This repository has been locked. All new issues and pull requests should be filed in https://github.com/ansible/ansible

Please read through the repomerge page in the dev guide. The guide contains links to tools which automatically move your issue or pull request to the ansible/ansible repo.

@ansibot ansibot closed this Apr 11, 2017

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.