1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Merge pull request #5655 from scottgilbert/devel

Allow keystring passed to authorized_key to contain blank lines and comments
This commit is contained in:
jctanner 2014-01-16 14:22:57 -08:00
commit 450bb37c8c

View file

@ -341,7 +341,9 @@ def enforce_state(module, params):
state = params.get("state", "present") state = params.get("state", "present")
key_options = params.get("key_options", None) key_options = params.get("key_options", None)
key = key.split('\n') # extract indivial keys into an array, skipping blank lines and comments
key = [s for s in key.splitlines() if s and not s.startswith('#')]
# check current state -- just get the filename, don't create file # check current state -- just get the filename, don't create file
do_write = False do_write = False