Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add HMAC lookup #61347

Open
wants to merge 3 commits into
base: devel
from

Conversation

@dbanttari
Copy link
Contributor

commented Aug 26, 2019

SUMMARY

Create HMAC lookup to simplify signing requests for APIs that use it but don't have Ansible modules

ISSUE TYPE
  • New Module Pull Request
COMPONENT NAME

hmac

ADDITIONAL INFORMATION
- name: Calculate HMAC using password
  debug:
    msg: "{{ lookup('hmac', 'string_to_be_signed', secret='asdf') }}"
TASK [test : Calculate HMAC using password] **********************************************************************
task path: ***/roles/test/tasks/main.yml:7
ok: [localhost] => {
    "msg": "qoR/uNWjQQa8sS77mRjUDPqV2ZXa44Y1Xnb/3AUvmlg="
}
@ansibot

This comment has been minimized.

Copy link
Contributor

commented Aug 26, 2019

The test ansible-test sanity --test pylint [explain] failed with 1 error:

test/units/plugins/lookup/test_hmac.py:40:68: bad-whitespace Exactly one space required after comma             expected=['fGW4FjaIgVzGlWLQ/SITPzp2cs5q9I9wOOVO7YsZPu4=','qoR/uNWjQQa8sS77mRjUDPqV2ZXa44Y1Xnb/3AUvmlg='],                                                                     ^

The test ansible-test sanity --test pylint [explain] failed with 2 errors:

lib/ansible/plugins/lookup/hmac.py:111:32: ansible-format-automatic-specification Format string contains automatic field numbering specification
lib/ansible/plugins/lookup/hmac.py:119:31: ansible-format-automatic-specification Format string contains automatic field numbering specification

The test ansible-test sanity --test future-import-boilerplate [explain] failed with 1 error:

test/units/plugins/lookup/test_hmac.py:0:0: missing: from __future__ import (absolute_import, division, print_function)

The test ansible-test sanity --test pep8 [explain] failed with 4 errors:

lib/ansible/plugins/lookup/hmac.py:81:1: E302 expected 2 blank lines, found 1
test/units/plugins/lookup/test_hmac.py:26:1: E302 expected 2 blank lines, found 1
test/units/plugins/lookup/test_hmac.py:40:69: E231 missing whitespace after ','
test/units/plugins/lookup/test_hmac.py:53:31: E261 at least two spaces before inline comment

click here for bot help

@ansibot ansibot removed the ci_verified label Aug 27, 2019

@ansibot

This comment has been minimized.

Copy link
Contributor

commented Aug 27, 2019

The test ansible-test sanity --test pylint [explain] failed with 1 error:

lib/ansible/plugins/lookup/hmac.py:73:0: misplaced-future __future__ import is not the first non docstring statement

The test ansible-test sanity --test future-import-boilerplate [explain] failed with 1 error:

test/units/plugins/lookup/test_hmac.py:0:0: missing: from __future__ import (absolute_import, division, print_function)

The test ansible-test sanity --test pep8 [explain] failed with 1 error:

lib/ansible/plugins/lookup/hmac.py:87:5: E303 too many blank lines (2)

click here for bot help

@ansibot ansibot added core_review and removed needs_revision labels Aug 27, 2019

@bcoca bcoca removed the needs_triage label Aug 29, 2019

@ansibot ansibot added the stale_ci label Sep 6, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.