mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Update expired keys (#21539)
If a key has expired it will not be added by this module, so check for "expired" in the list of keys. Example output with expired key: pub 1024D/5072E1F5 2003-02-03 [expired: 2017-02-16] uid MySQL Release Engineering <mysql-build@oss.oracle.com>
This commit is contained in:
parent
9f1a71797e
commit
7018aa3316
1 changed files with 1 additions and 1 deletions
|
@ -200,7 +200,7 @@ def all_keys(module, keyring, short_format):
|
|||
results = []
|
||||
lines = to_native(out).split('\n')
|
||||
for line in lines:
|
||||
if line.startswith("pub") or line.startswith("sub"):
|
||||
if (line.startswith("pub") or line.startswith("sub")) and not "expired" in line:
|
||||
tokens = line.split()
|
||||
code = tokens[1]
|
||||
(len_type, real_code) = code.split("/")
|
||||
|
|
Loading…
Reference in a new issue