Am Donnerstag, 12. Oktober 2017 11:14:53 UTC+2 schrieb Kai Stian Olstad:
>
> On 12.10.2017 08:23, Goetz Leupold wrote: 
> > Hi, 
> > 
> > i have a problem with the response of the authorized_key-module in 
> > combination with the Jinja2 Filter "json_query". This filter works 
> > already 
> > fine for me with the prompt-Module where i extract all the inputs with 
> > "y"(query: "results[?user_input=='y']"). 
> > 
> > ansible --version 
> > ansible 2.4.0.0 
> > python version = 2.7.10 (default, Feb  7 2017, 00:08:15) [GCC 4.2.1 
> > Compatible Apple LLVM 8.0.0 (clang-800.0.34)] 
> > 
> > This is a testplay to prey my problem(you'll need 2 testssh keys in 
> > /tmp 
> > with ".pub" ending, example content "ssh-rsa 123== Comment 1" ): 
>
> Instead of we recreate this why don't you run it for us and post the 
> output? 
> Preferably with 
> "ANSIBLE_STDOUT_CALLBACK=debug ansible-playbook -v playbook.yaml" 
>
> -- 
> Kai Stian Olstad 
>

There is no output of the second debug-task. Dont know why...
Output of the command:

Using /Users/blackended_user/git/project/ansible/ansible.cfg as config file

PLAY [localhost] 
****************************************************************************************************

TASK [Gathering Facts] 
**********************************************************************************************
ok: [localhost]

TASK [test] 
*********************************************************************************************************
ok: [localhost] => (item=/tmp/1.pub) => {
    "changed": false, 
    "comment": null, 
    "exclusive": false, 
    "failed": false, 
    "gid": 31346032, 
    "group": "blackended_group", 
    "item": "/tmp/1.pub", 
    "key": "ssh-rsa 123== Comment 1", 
    "key_options": null, 
    "keyfile": "/tmp/test_authorized_keys", 
    "manage_dir": false, 
    "mode": "0600", 
    "owner": "blackended_user", 
    "path": "/tmp/test_authorized_keys", 
    "size": 24, 
    "state": "file", 
    "uid": 218476800, 
    "unique": false, 
    "user": "blackended_user", 
    "validate_certs": true
}
changed: [localhost] => (item=/tmp/2.pub) => {
    "changed": true, 
    "comment": null, 
    "exclusive": false, 
    "failed": false, 
    "gid": 31346032, 
    "group": "blackended_group", 
    "item": "/tmp/2.pub", 
    "key": "ssh-rsa 456== Comment 2", 
    "key_options": null, 
    "keyfile": "/tmp/test_authorized_keys", 
    "manage_dir": false, 
    "mode": "0600", 
    "owner": "blackended_user", 
    "path": "/tmp/test_authorized_keys", 
    "size": 48, 
    "state": "file", 
    "uid": 218476800, 
    "unique": false, 
    "user": "blackended_user", 
    "validate_certs": true
}

TASK [debug] 
********************************************************************************************************
ok: [localhost] => {}

MSG:

{'msg': u'All items completed', 'changed': True, 'results': [{u'comment': 
None, u'exclusive': False, u'uid': 218476800, u'owner': u'blackended_user', 
u'manage_dir': False, u'group': u'ADS\\Dom\xe4nen-Benutzer', 'failed': 
False, u'state': u'file', u'gid': 31346032, u'invocation': {u'module_args': 
{u'comment': None, u'exclusive': False, u'validate_certs': True, 
u'key_options': None, u'state': u'present', u'user': u'blackended_user', 
u'key': u'ssh-rsa 123== Comment 1', u'path': u'/tmp/test_authorized_keys', 
u'unique': False, u'keyfile': u'/tmp/test_authorized_keys', u'manage_dir': 
False}}, u'size': 24, '_ansible_parsed': True, '_ansible_item_result': 
True, u'key_options': None, u'user': u'blackended_user', u'key': u'ssh-rsa 
123== Comment 1', u'path': u'/tmp/test_authorized_keys', u'unique': False, 
'_ansible_no_log': False, u'keyfile': u'/tmp/test_authorized_keys', 
'changed': False, 'item': u'/tmp/1.pub', u'mode': u'0600', 
u'validate_certs': True}, {u'comment': None, u'exclusive': False, u'uid': 
218476800, u'owner': u'blackended_user', u'manage_dir': False, u'group': 
u'ADS\\Dom\xe4nen-Benutzer', 'failed': False, u'state': u'file', u'gid': 
31346032, u'invocation': {u'module_args': {u'comment': None, u'exclusive': 
False, u'validate_certs': True, u'changed': True, u'key_options': None, 
u'state': u'present', u'user': u'blackended_user', u'key': u'ssh-rsa 456== 
Comment 2', u'path': u'/tmp/test_authorized_keys', u'unique': False, 
u'keyfile': u'/tmp/test_authorized_keys', u'manage_dir': False}}, u'size': 
48, '_ansible_parsed': True, '_ansible_item_result': True, u'key_options': 
None, u'user': u'blackended_user', u'key': u'ssh-rsa 456== Comment 2', 
u'path': u'/tmp/test_authorized_keys', u'unique': False, '_ansible_no_log': 
False, u'keyfile': u'/tmp/test_authorized_keys', u'changed': True, 'item': 
u'/tmp/2.pub', u'mode': u'0600', u'validate_certs': True}]}

TASK [debug] 
********************************************************************************************************

PLAY RECAP 
**********************************************************************************************************
localhost                  : ok=3    changed=1    unreachable=0    
failed=0   



-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/436012b7-00af-47c0-8180-e4b0b97b7b95%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to