On Wed, Jul 22, 2015 at 3:53 PM, Timothy Appnel <
ti...@ansible.com> wrote:
> Then you have json (what simplejson became when it was brought in to the
> python core). <tim/>
>
That's nice to know! And, there it is!
~ # python
Python 2.6.7 (r267:88850, Jun 9 2014, 18:31:44)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-50)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import json
>>>
~ #
But when I try to do something simple, get date in raw mode,
[ansible@scan ansible]$ ansible vmhosts -m raw -a 'date'
vmhost2.example.com | success | rc=0 >>
Wed Jul 22 20:15:50 UTC 2015
[ansible@scan ansible]$
it works, but
[ansible@scan ansible]$ ansible vmhosts -a date
vmhost2.example.com | FAILED >> {
"failed": true,
"msg": "Traceback (most recent call last):\r\n File
\"//.ansible/tmp/ansible-tmp-1437550117.11-115799489197738/command\",
line 294, in <module>\r\n import grp\r\nImportError: No module
named grp\r\nOpenSSH_5.3p1, OpenSSL 1.0.1e-fips 11 Feb 2013\ndebug1:
Reading configuration data /etc/ssh/ssh_config\r\ndebug1: Applying
options for *\r\ndebug1: Connecting to
vmhost2.example.com [10.0.0.20]
port 22.\r\ndebug1: fd 3 clearing O_NONBLOCK\r\ndebug1: Connection
established.\r\ndebug1: identity file
/home/ansible/ansible/roles/vmhosts/files/vmhost2 type -1\r\ndebug1:
identity file /home/ansible/ansible/roles/vmhosts/files/vmhost2-cert
type -1\r\ndebug1: Remote protocol version 2.0, remote software
version OpenSSH_5.6\r\ndebug1: match: OpenSSH_5.6 pat
OpenSSH*\r\ndebug1: Enabling compatibility mode for protocol
2.0\r\ndebug1: Local version string SSH-2.0-OpenSSH_5.3\r\ndebug1:
SSH2_MSG_KEXINIT sent\r\ndebug1: SSH2_MSG_KEXINIT received\r\ndebug1:
kex: server->client aes128-ctr hmac-sha1
zl...@openssh.com\r\ndebug1:
kex: client->server aes128-ctr hmac-sha1
zl...@openssh.com\r\ndebug1:
SSH2_MSG_KEX_DH_GEX_REQUEST(1024<2048<8192) sent\r\ndebug1: expecting
SSH2_MSG_KEX_DH_GEX_GROUP\r\ndebug1: SSH2_MSG_KEX_DH_GEX_INIT
sent\r\ndebug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY\r\ndebug1: Host
'
vmhost2.example.com' is known and matches the RSA host
key.\r\ndebug1: Found key in
/home/ansible/.ssh/known_hosts:2\r\ndebug1: ssh_rsa_verify: signature
correct\r\ndebug1: SSH2_MSG_NEWKEYS sent\r\ndebug1: expecting
SSH2_MSG_NEWKEYS\r\ndebug1: SSH2_MSG_NEWKEYS received\r\ndebug1:
SSH2_MSG_SERVICE_REQUEST sent\r\ndebug1: SSH2_MSG_SERVICE_ACCEPT
received\r\ndebug1: Authentications that can continue:
publickey,keyboard-interactive\r\ndebug1: Next authentication method:
publickey\r\ndebug1: Trying private key:
/home/ansible/ansible/roles/vmhosts/files/vmhost2\r\ndebug1: read PEM
private key done: type RSA\r\ndebug1: Enabling compression at level
6.\r\ndebug1: Authentication succeeded (publickey).\r\ndebug1: channel
0: new [client-session]\r\ndebug1: Requesting
no-more-...@openssh.com\r\ndebug1: Entering interactive
session.\r\ndebug1: Sending environment.\r\ndebug1: Sending env LANG =
en_US.UTF-8\r\ndebug1: Sending command: /bin/sh -c 'LANG=en_US.UTF-8
LC_CTYPE=en_US.UTF-8 /usr/bin/python
//.ansible/tmp/ansible-tmp-1437550117.11-115799489197738/command; rm
-rf //.ansible/tmp/ansible-tmp-1437550117.11-115799489197738/
>/dev/null 2>&1'\r\ndebug1: client_input_channel_req: channel 0 rtype
exit-status reply 0\r\ndebug1: client_input_channel_req: channel 0
rtype
e...@openssh.com reply 0\r\ndebug1: channel 0: free:
client-session, nchannels 1\r\ndebug1: fd 1 clearing
O_NONBLOCK\r\ndebug1: fd 2 clearing O_NONBLOCK\r\nConnection to
vmhost2.example.com closed.\r\nTransferred: sent 2504, received 2072
bytes, in 0.1 seconds\r\nBytes per second: sent 31236.7, received
25847.6\r\ndebug1: Exit status 0\r\ndebug1: compress outgoing: raw
data 662, compressed 421, factor 0.64\r\ndebug1: compress incoming:
raw data 316, compressed 258, factor 0.82\r\n",
"parsed": false
}
[ansible@scan ansible]$
I then realize I am barking at the wrong tree: the target does not
have the grp module.
>
https://groups.google.com/d/msgid/ansible-project/CAOMCme4e8G%3DnprsfOuHvrG-Fad8UiBhuSzmL5HxyYkB5JH%3DUvg%40mail.gmail.com.