mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
PEP 8 fixes.
This commit is contained in:
parent
16615811b4
commit
cdc56afe01
1 changed files with 4 additions and 4 deletions
|
@ -25,17 +25,17 @@ Lookup plugin to grab secrets from the OS keyring.
|
||||||
|
|
||||||
Warning the secret will be output to the screen
|
Warning the secret will be output to the screen
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
---
|
---
|
||||||
- hosts: localhost
|
- hosts: localhost
|
||||||
tasks:
|
tasks:
|
||||||
- name : test
|
- name : test
|
||||||
debug:
|
debug:
|
||||||
msg: "Password: {{item}}"
|
msg: "Password: {{item}}"
|
||||||
with_keyring:
|
with_keyring:
|
||||||
- 'servicename username'
|
- 'servicename username'
|
||||||
|
|
||||||
ansible localhost -m debug -a "msg=\"{{item}}\" with_keyring= 'servicename username'"
|
ansible localhost -m debug -a "msg=\"{{item}}\" with_keyring= 'servicename username'"
|
||||||
|
|
||||||
'''
|
'''
|
||||||
HAS_KEYRING = True
|
HAS_KEYRING = True
|
||||||
|
@ -59,7 +59,7 @@ from ansible.plugins.lookup import LookupBase
|
||||||
class LookupModule(LookupBase):
|
class LookupModule(LookupBase):
|
||||||
|
|
||||||
def run(self, terms, **kwargs):
|
def run(self, terms, **kwargs):
|
||||||
if not HAS_KEYRING:
|
if not HAS_KEYRING:
|
||||||
raise AnsibleError(u"Can't LOOKUP(keyring): missing required python library 'keyring'")
|
raise AnsibleError(u"Can't LOOKUP(keyring): missing required python library 'keyring'")
|
||||||
|
|
||||||
display.vvvv(u"keyring: %s" % keyring.get_keyring() )
|
display.vvvv(u"keyring: %s" % keyring.get_keyring() )
|
||||||
|
|
Loading…
Add table
Reference in a new issue