添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement . We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account config file = configured module search path = Default w/o overrides python version = 2.7.15 (default, May 1 2018, 16:44:37) [GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.39.2)]
CONFIGURATION

[defaults]
#pipelining=True
deprecation_warnings=False

OS / ENVIRONMENT

mac os sierra 10.12.6

SUMMARY

I am trying to print variable.stdout and I keep getting error message undefined varialble error message

STEPS TO REPRODUCE
- hosts : OEL7 user : root become : yes tasks : - name : 1.1.18 - Ensure sticky bit is set on all world-writable directories - changed_when false shell : echo "hello" register : hello # script : /tmp/pptest.sh - debug : var : " hello.stdout_lines " changed_when : False
EXPECTED RESULTS

it should display the values of variables

ACTUAL RESULTS
ansible-playbook -vvvv -i /Users/opc/ansible/OEL7/hosts  /Users/opc/ansible/OEL7/ptest.yml  --tags "1.1.18"
Using /Users/opc/ansible/OEL6/ansible.cfg as config file
Loading callback plugin default of type stdout, v2.0 from /usr/local/lib/python2.7/site-packages/ansible/plugins/callback/__init__.pyc
PLAYBOOK: ptest.yml *************************************************************************************************************************************************************************************
1 plays in /Users/opc/ansible/OEL7/ptest.yml
PLAY [OEL7] *********************************************************************************************************************************************************************************************
TASK [Gathering Facts] **********************************************************************************************************************************************************************************
Using module file /usr/local/lib/python2.7/site-packages/ansible/modules/system/setup.py
<129.213.47.235> ESTABLISH SSH CONNECTION FOR USER: opc
<129.213.47.235> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=opc -o ConnectTimeout=10 -o ControlPath=/Users/opc/.ansible/cp/4fb71cc81d 129.213.47.235 '/bin/sh -c '"'"'echo ~ && sleep 0'"'"''
<129.213.47.235> (0, '/home/opc\n', 'OpenSSH_7.4p1, LibreSSL 2.5.0\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 53: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug1: Control socket "/Users/opc/.ansible/cp/4fb71cc81d" does not exist\r\ndebug2: resolving "129.213.47.235" port 22\r\ndebug2: ssh_connect_direct: needpriv 0\r\ndebug1: Connecting to 129.213.47.235 [129.213.47.235] port 22.\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug1: fd 3 clearing O_NONBLOCK\r\ndebug1: Connection established.\r\ndebug3: timeout: 9884 ms remain after connect\r\ndebug1: identity file /Users/opc/.ssh/id_rsa type 1\r\ndebug1: key_load_public: No such file or directory\r\ndebug1: identity file /Users/opc/.ssh/id_rsa-cert type -1\r\ndebug1: key_load_public: No such file or directory\r\ndebug1: identity file /Users/opc/.ssh/id_dsa type -1\r\ndebug1: key_load_public: No such file or directory\r\ndebug1: identity file /Users/opc/.ssh/id_dsa-cert type -1\r\ndebug1: key_load_public: No such file or directory\r\ndebug1: identity file /Users/opc/.ssh/id_ecdsa type -1\r\ndebug1: key_load_public: No such file or directory\r\ndebug1: identity file /Users/opc/.ssh/id_ecdsa-cert type -1\r\ndebug1: key_load_public: No such file or directory\r\ndebug1: identity file /Users/opc/.ssh/id_ed25519 type -1\r\ndebug1: key_load_public: No such file or directory\r\ndebug1: identity file /Users/opc/.ssh/id_ed25519-cert type -1\r\ndebug1: Enabling compatibility mode for protocol 2.0\r\ndebug1: Local version string SSH-2.0-OpenSSH_7.4\r\ndebug1: Remote protocol version 2.0, remote software version OpenSSH_7.4\r\ndebug1: match: OpenSSH_7.4 pat OpenSSH* compat 0x04000000\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug1: Authenticating to 129.213.47.235:22 as \'opc\'\r\ndebug3: hostkeys_foreach: reading file "/Users/opc/.ssh/known_hosts"\r\ndebug3: record_hostkey: found key type ECDSA in file /Users/opc/.ssh/known_hosts:4\r\ndebug3: load_hostkeys: loaded 1 keys from 129.213.47.235\r\ndebug3: order_hostkeyalgs: prefer hostkeyalgs: ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521\r\ndebug3: send packet: type 20\r\ndebug1: SSH2_MSG_KEXINIT sent\r\ndebug3: receive packet: type 20\r\ndebug1: SSH2_MSG_KEXINIT received\r\ndebug2: local client KEXINIT proposal\r\ndebug2: KEX algorithms: curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1,ext-info-c\r\ndebug2: host key algorithms: ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,ssh-ed25519,rsa-sha2-512,rsa-sha2-256,ssh-rsa\r\ndebug2: ciphers ctos: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,aes128-cbc,aes192-cbc,aes256-cbc\r\ndebug2: ciphers stoc: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,aes128-cbc,aes192-cbc,aes256-cbc\r\ndebug2: MACs ctos: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1\r\ndebug2: MACs stoc: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1\r\ndebug2: compression ctos: zlib@openssh.com,zlib,none\r\ndebug2: compression stoc: zlib@openssh.com,zlib,none\r\ndebug2: languages ctos: \r\ndebug2: languages stoc: \r\ndebug2: first_kex_follows 0 \r\ndebug2: reserved 0 \r\ndebug2: peer server KEXINIT proposal\r\ndebug2: KEX algorithms: curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1\r\ndebug2: host key algorithms: ssh-rsa,rsa-sha2-512,rsa-sha2-256,ecdsa-sha2-nistp256,ssh-ed25519\r\ndebug2: ciphers ctos: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,aes128-cbc,aes192-cbc,aes256-cbc,blowfish-cbc,cast128-cbc,3des-cbc\r\ndebug2: ciphers stoc: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,aes128-cbc,aes192-cbc,aes256-cbc,blowfish-cbc,cast128-cbc,3des-cbc\r\ndebug2: MACs ctos: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1\r\ndebug2: MACs stoc: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1\r\ndebug2: compression ctos: none,zlib@openssh.com\r\ndebug2: compression stoc: none,zlib@openssh.com\r\ndebug2: languages ctos: \r\ndebug2: languages stoc: \r\ndebug2: first_kex_follows 0 \r\ndebug2: reserved 0 \r\ndebug1: kex: algorithm: curve25519-sha256\r\ndebug1: kex: host key algorithm: ecdsa-sha2-nistp256\r\ndebug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: zlib@openssh.com\r\ndebug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: zlib@openssh.com\r\ndebug3: send packet: type 30\r\ndebug1: expecting SSH2_MSG_KEX_ECDH_REPLY\r\ndebug3: receive packet: type 31\r\ndebug1: Server host key: ecdsa-sha2-nistp256 SHA256:e3kdtjhnCwNg1vi24KO6R8R3gnErykI9vmqB5eKoGx0\r\ndebug3: hostkeys_foreach: reading file "/Users/opc/.ssh/known_hosts"\r\ndebug3: record_hostkey: found key type ECDSA in file /Users/opc/.ssh/known_hosts:4\r\ndebug3: load_hostkeys: loaded 1 keys from 129.213.47.235\r\ndebug1: Host \'129.213.47.235\' is known and matches the ECDSA host key.\r\ndebug1: Found key in /Users/opc/.ssh/known_hosts:4\r\ndebug3: send packet: type 21\r\ndebug2: set_newkeys: mode 1\r\ndebug1: rekey after 134217728 blocks\r\ndebug1: SSH2_MSG_NEWKEYS sent\r\ndebug1: expecting SSH2_MSG_NEWKEYS\r\ndebug3: receive packet: type 21\r\ndebug1: SSH2_MSG_NEWKEYS received\r\ndebug2: set_newkeys: mode 0\r\ndebug1: rekey after 134217728 blocks\r\ndebug2: key: /Users/opc/.ssh/id_rsa (0x7f94d1515160)\r\ndebug2: key: /Users/opc/.ssh/id_dsa (0x0)\r\ndebug2: key: /Users/opc/.ssh/id_ecdsa (0x0)\r\ndebug2: key: /Users/opc/.ssh/id_ed25519 (0x0)\r\ndebug3: send packet: type 5\r\ndebug3: receive packet: type 7\r\ndebug1: SSH2_MSG_EXT_INFO received\r\ndebug1: kex_input_ext_info: server-sig-algs=<rsa-sha2-256,rsa-sha2-512>\r\ndebug3: receive packet: type 6\r\ndebug2: service_accept: ssh-userauth\r\ndebug1: SSH2_MSG_SERVICE_ACCEPT received\r\ndebug3: send packet: type 50\r\ndebug3: receive packet: type 51\r\ndebug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic\r\ndebug3: start over, passed a different list publickey,gssapi-keyex,gssapi-with-mic\r\ndebug3: preferred gssapi-with-mic,gssapi-keyex,hostbased,publickey\r\ndebug3: authmethod_lookup gssapi-with-mic\r\ndebug3: remaining preferred: gssapi-keyex,hostbased,publickey\r\ndebug3: authmethod_lookup gssapi-keyex\r\ndebug3: remaining preferred: hostbased,publickey\r\ndebug2: Unrecognized authentication method name: gssapi-keyex\r\ndebug3: authmethod_lookup publickey\r\ndebug3: remaining preferred: ,publickey\r\ndebug3: authmethod_is_enabled publickey\r\ndebug1: Next authentication method: publickey\r\ndebug1: Offering RSA public key: /Users/opc/.ssh/id_rsa\r\ndebug3: send_pubkey_test\r\ndebug3: send packet: type 50\r\ndebug2: we sent a publickey packet, wait for reply\r\ndebug3: receive packet: type 60\r\ndebug1: Server accepts key: pkalg rsa-sha2-512 blen 279\r\ndebug2: input_userauth_pk_ok: fp SHA256:a5C17VQzEXw31mY/fNcu2m7oERZ1oi8uGdCO87fdF2o\r\ndebug3: sign_and_send_pubkey: RSA SHA256:a5C17VQzEXw31mY/fNcu2m7oERZ1oi8uGdCO87fdF2o\r\ndebug3: send packet: type 50\r\ndebug3: receive packet: type 52\r\ndebug1: Enabling compression at level 6.\r\ndebug1: Authentication succeeded (publickey).\r\nAuthenticated to 129.213.47.235 ([129.213.47.235]:22).\r\ndebug1: setting up multiplex master socket\r\ndebug3: muxserver_listen: temporary control path /Users/opc/.ansible/cp/4fb71cc81d.8jvTVXSEX7agkW5A\r\ndebug2: fd 4 setting O_NONBLOCK\r\ndebug3: fd 4 is O_NONBLOCK\r\ndebug3: fd 4 is O_NONBLOCK\r\ndebug1: channel 0: new [/Users/opc/.ansible/cp/4fb71cc81d]\r\ndebug3: muxserver_listen: mux listener channel 0 fd 4\r\ndebug2: fd 3 setting TCP_NODELAY\r\ndebug3: ssh_packet_set_tos: set IP_TOS 0x08\r\ndebug1: control_persist_detach: backgrounding master process\r\ndebug2: control_persist_detach: background process is 50579\r\ndebug2: fd 4 setting O_NONBLOCK\r\ndebug1: forking to background\r\ndebug1: Entering interactive session.\r\ndebug1: pledge: id\r\ndebug2: set_control_persist_exit_time: schedule exit in 60 seconds\r\ndebug1: multiplexing control connection\r\ndebug3: fd 5 is O_NONBLOCK\r\ndebug3: fd 5 is O_NONBLOCK\r\ndebug1: channel 1: new [mux-control]\r\ndebug3: channel_post_mux_listener: new mux channel 1 fd 5\r\ndebug3: mux_master_read_cb: channel 1: hello sent\r\ndebug2: set_control_persist_exit_time: cancel scheduled exit\r\ndebug3: mux_master_read_cb: channel 1 packet type 0x00000001 len 4\r\ndebug2: process_mux_master_hello: channel 1 slave version 4\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_master_read_cb: channel 1 packet type 0x10000004 len 4\r\ndebug2: process_mux_alive_check: channel 1: alive check\r\ndebug3: mux_client_request_alive: done pid = 50581\r\ndebug3: mux_client_request_session: session request sent\r\ndebug3: mux_master_read_cb: channel 1 packet type 0x10000002 len 80\r\ndebug2: process_mux_new_session: channel 1: request tty 0, X 0, agent 0, subsys 0, term "xterm-256color", cmd "/bin/sh -c \'echo ~ && sleep 0\'", env 0\r\ndebug3: process_mux_new_session: got fds stdin 6, stdout 7, stderr 8\r\ndebug2: fd 7 setting O_NONBLOCK\r\ndebug2: fd 8 setting O_NONBLOCK\r\ndebug1: channel 2: new [client-session]\r\ndebug2: process_mux_new_session: channel_new: 2 linked to control channel 1\r\ndebug2: channel 2: send open\r\ndebug3: send packet: type 90\r\ndebug3: receive packet: type 80\r\ndebug1: client_input_global_request: rtype hostkeys-00@openssh.com want_reply 0\r\ndebug3: receive packet: type 91\r\ndebug2: callback start\r\ndebug2: client_session2_setup: id 2\r\ndebug1: Sending command: /bin/sh -c \'echo ~ && sleep 0\'\r\ndebug2: channel 2: request exec confirm 1\r\ndebug3: send packet: type 98\r\ndebug3: mux_session_confirm: sending success reply\r\ndebug2: callback done\r\ndebug2: channel 2: open confirm rwindow 0 rmax 32768\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug2: channel 2: rcvd adjust 2097152\r\ndebug3: receive packet: type 99\r\ndebug2: channel_input_status_confirm: type 99 id 2\r\ndebug2: exec request accepted on channel 2\r\ndebug3: receive packet: type 98\r\ndebug1: client_input_channel_req: channel 2 rtype exit-status reply 0\r\ndebug3: mux_exit_message: channel 2: exit message, exitval 0\r\ndebug3: receive packet: type 98\r\ndebug1: client_input_channel_req: channel 2 rtype eow@openssh.com reply 0\r\ndebug2: channel 2: rcvd eow\r\ndebug2: channel 2: close_read\r\ndebug2: channel 2: input open -> closed\r\ndebug3: receive packet: type 96\r\ndebug2: channel 2: rcvd eof\r\ndebug2: channel 2: output open -> drain\r\ndebug2: channel 2: obuf empty\r\ndebug2: channel 2: close_write\r\ndebug2: channel 2: output drain -> closed\r\ndebug3: receive packet: type 97\r\ndebug2: channel 2: rcvd close\r\ndebug3: channel 2: will not send data after close\r\ndebug2: channel 2: send close\r\ndebug3: send packet: type 97\r\ndebug2: channel 2: is dead\r\ndebug2: channel 2: gc: notify user\r\ndebug3: mux_master_session_cleanup_cb: entering for channel 2\r\ndebug2: channel 1: rcvd close\r\ndebug2: channel 1: output open -> drain\r\ndebug2: channel 1: close_read\r\ndebug2: channel 1: input open -> closed\r\ndebug2: channel 2: gc: user detached\r\ndebug2: channel 2: is dead\r\ndebug2: channel 2: garbage collecting\r\ndebug1: channel 2: free: client-session, nchannels 3\r\ndebug3: channel 2: status: The following connections are open:\r\n  #1 mux-control (t16 r-1 i3/0 o1/16 fd 5/5 cc -1)\r\n  #2 client-session (t4 r0 i3/0 o3/0 fd -1/-1 cc -1)\r\n\r\ndebug2: channel 1: obuf empty\r\ndebug2: channel 1: close_write\r\ndebug2: channel 1: output drain -> closed\r\ndebug2: channel 1: is dead (local)\r\ndebug2: channel 1: gc: notify user\r\ndebug3: mux_master_control_cleanup_cb: entering for channel 1\r\ndebug2: channel 1: gc: user detached\r\ndebug2: channel 1: is dead (local)\r\ndebug2: channel 1: garbage collecting\r\ndebug1: channel 1: free: mux-control, nchannels 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug3: channel 1: status: The following connections are open:\r\n  #1 mux-control (t16 r-1 i3/0 o3/0 fd 5/5 cc -1)\r\n\r\ndebug2: set_control_persist_exit_time: schedule exit in 60 seconds\r\ndebug2: Received exit status from master 0\r\n')
<129.213.47.235> ESTABLISH SSH CONNECTION FOR USER: opc
<129.213.47.235> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=opc -o ConnectTimeout=10 -o ControlPath=/Users/opc/.ansible/cp/4fb71cc81d 129.213.47.235 '/bin/sh -c '"'"'( umask 77 && mkdir -p "` echo /home/opc/.ansible/tmp/ansible-tmp-1526442649.03-36447815015428 `" && echo ansible-tmp-1526442649.03-36447815015428="` echo /home/opc/.ansible/tmp/ansible-tmp-1526442649.03-36447815015428 `" ) && sleep 0'"'"''
<129.213.47.235> (0, 'ansible-tmp-1526442649.03-36447815015428=/home/opc/.ansible/tmp/ansible-tmp-1526442649.03-36447815015428\n', 'OpenSSH_7.4p1, LibreSSL 2.5.0\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 53: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 50581\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\n')
<129.213.47.235> PUT /tmp/tmpElRCg6 TO /home/opc/.ansible/tmp/ansible-tmp-1526442649.03-36447815015428/setup.py
<129.213.47.235> SSH: EXEC sftp -b - -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=opc -o ConnectTimeout=10 -o ControlPath=/Users/opc/.ansible/cp/4fb71cc81d '[129.213.47.235]'
<129.213.47.235> (0, 'sftp> put /tmp/tmpElRCg6 /home/opc/.ansible/tmp/ansible-tmp-1526442649.03-36447815015428/setup.py\n', 'OpenSSH_7.4p1, LibreSSL 2.5.0\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 53: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 50581\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug2: Remote version: 3\r\ndebug2: Server supports extension "posix-rename@openssh.com" revision 1\r\ndebug2: Server supports extension "statvfs@openssh.com" revision 2\r\ndebug2: Server supports extension "fstatvfs@openssh.com" revision 2\r\ndebug2: Server supports extension "hardlink@openssh.com" revision 1\r\ndebug2: Server supports extension "fsync@openssh.com" revision 1\r\ndebug3: Sent message fd 8 T:16 I:1\r\ndebug3: SSH_FXP_REALPATH . -> /home/opc size 0\r\ndebug3: Looking up /tmp/tmpElRCg6\r\ndebug3: Sent message fd 8 T:17 I:2\r\ndebug3: Received stat reply T:101 I:2\r\ndebug1: Couldn\'t stat remote file: No such file or directory\r\ndebug3: Sent message SSH2_FXP_OPEN I:3 P:/home/opc/.ansible/tmp/ansible-tmp-1526442649.03-36447815015428/setup.py\r\ndebug3: Sent message SSH2_FXP_WRITE I:4 O:0 S:32768\r\ndebug3: SSH2_FXP_STATUS 0\r\ndebug3: In write loop, ack for 4 32768 bytes at 0\r\ndebug3: Sent message SSH2_FXP_WRITE I:5 O:32768 S:32768\r\ndebug3: Sent message SSH2_FXP_WRITE I:6 O:65536 S:32768\r\ndebug3: Sent message SSH2_FXP_WRITE I:7 O:98304 S:5247\r\ndebug3: SSH2_FXP_STATUS 0\r\ndebug3: In write loop, ack for 5 32768 bytes at 32768\r\ndebug3: SSH2_FXP_STATUS 0\r\ndebug3: In write loop, ack for 6 32768 bytes at 65536\r\ndebug3: SSH2_FXP_STATUS 0\r\ndebug3: In write loop, ack for 7 5247 bytes at 98304\r\ndebug3: Sent message SSH2_FXP_CLOSE I:4\r\ndebug3: SSH2_FXP_STATUS 0\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\n')
<129.213.47.235> ESTABLISH SSH CONNECTION FOR USER: opc
<129.213.47.235> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=opc -o ConnectTimeout=10 -o ControlPath=/Users/opc/.ansible/cp/4fb71cc81d 129.213.47.235 '/bin/sh -c '"'"'chmod u+x /home/opc/.ansible/tmp/ansible-tmp-1526442649.03-36447815015428/ /home/opc/.ansible/tmp/ansible-tmp-1526442649.03-36447815015428/setup.py && sleep 0'"'"''
<129.213.47.235> (0, '', 'OpenSSH_7.4p1, LibreSSL 2.5.0\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 53: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 50581\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\n')
<129.213.47.235> ESTABLISH SSH CONNECTION FOR USER: opc
<129.213.47.235> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=opc -o ConnectTimeout=10 -o ControlPath=/Users/opc/.ansible/cp/4fb71cc81d -tt 129.213.47.235 '/bin/sh -c '"'"'sudo -H -S -n -u root /bin/sh -c '"'"'"'"'"'"'"'"'echo BECOME-SUCCESS-jdvryjtcxjpyaazultqlvqxsxdxvnwcu; /usr/bin/python /home/opc/.ansible/tmp/ansible-tmp-1526442649.03-36447815015428/setup.py; rm -rf "/home/opc/.ansible/tmp/ansible-tmp-1526442649.03-36447815015428/" > /dev/null 2>&1'"'"'"'"'"'"'"'"' && sleep 0'"'"''
<129.213.47.235> (0, '\r\n{"invocation": {"module_args": {"filter": "*", "gather_subset": ["all"], "fact_path": "/etc/ansible/facts.d", "gather_timeout": 10}}, "changed": false, "ansible_facts": {"ansible_product_serial": "NA", "ansible_form_factor": "Other", "ansible_product_version": "pc-i440fx-2.9", "ansible_fips": false, "ansible_service_mgr": "systemd", "ansible_user_id": "root", "ansible_user_dir": "/root", "ansible_memtotal_mb": 14778, "ansible_ssh_host_key_ecdsa_public": "AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBIVWxo13AljQsfaXXt6xh7Yy4fJ7A9JwUL21PLcEN+B2cTfslX+spgOGDMVgGGoTklYAGiXyU4QTIEqClVNkhsQ=", "ansible_distribution_version": "7.5", "ansible_domain": "uscp1sbxitiout.uscp1sbxitiout.oraclevcn.com", "ansible_date_time": {"weekday_number": "3", "iso8601_basic_short": "20180516T035052", "tz": "GMT", "weeknumber": "20", "hour": "03", "year": "2018", "minute": "50", "tz_offset": "+0000", "month": "05", "epoch": "1526442652", "iso8601_micro": "2018-05-16T03:50:52.592747Z", "weekday": "Wednesday", "time": "03:50:52", "date": "2018-05-16", "iso8601": "2018-05-16T03:50:52Z", "day": "16", "iso8601_basic": "20180516T035052592665", "second": "52"}, "ansible_ssh_host_key_ed25519_public": "AAAAC3NzaC1lZDI1NTE5AAAAIHWgv+4EVwD6TXMUYSQ7DB7TUhiYbFHOnk4JwpAgxJrL", "ansible_processor_cores": 1, "ansible_virtualization_role": "guest", "ansible_dns": {"nameservers": ["169.254.169.254"], "search": ["uscp1sbxitiout.oraclevcn.com", "uscp1sbxitiout.uscp1sbxitiout.oraclevcn.com"]}, "ansible_processor_vcpus": 2, "ansible_bios_version": "0.0.0", "ansible_processor": ["GenuineIntel", "Intel(R) Xeon(R) Platinum 8167M CPU @ 2.00GHz", "GenuineIntel", "Intel(R) Xeon(R) Platinum 8167M CPU @ 2.00GHz"], "ansible_virtualization_type": "kvm", "ansible_lo": {"features": {"tx_checksum_ipv4": "off [fixed]", "generic_receive_offload": "on", "tx_checksum_ipv6": "off [fixed]", "tx_scatter_gather_fraglist": "on [fixed]", "rx_all": "off [fixed]", "highdma": "on [fixed]", "rx_fcs": "off [fixed]", "tx_lockless": "on [fixed]", "tx_tcp_ecn_segmentation": "on", "tx_tcp6_segmentation": "on", "tx_gso_robust": "off [fixed]", "tx_ipip_segmentation": "off [fixed]", "tx_checksumming": "on", "vlan_challenged": "on [fixed]", "hw_switch_offload": "off [fixed]", "loopback": "on [fixed]", "fcoe_mtu": "off [fixed]", "tx_checksum_sctp": "on [fixed]", "tx_vlan_stag_hw_insert": "off [fixed]", "rx_vlan_stag_hw_parse": "off [fixed]", "rx_vlan_stag_filter": "off [fixed]", "large_receive_offload": "off [fixed]", "tx_scatter_gather": "on [fixed]", "rx_checksumming": "on [fixed]", "tx_tcp_segmentation": "on", "netns_local": "on [fixed]", "busy_poll": "off [fixed]", "generic_segmentation_offload": "on", "tx_udp_tnl_segmentation": "off [fixed]", "tcp_segmentation_offload": "on", "l2_fwd_offload": "off [fixed]", "rx_vlan_offload": "off [fixed]", "ntuple_filters": "off [fixed]", "tx_vlan_offload": "off [fixed]", "tx_nocache_copy": "off [fixed]", "udp_fragmentation_offload": "on", "scatter_gather": "on", "tx_sit_segmentation": "off [fixed]", "tx_checksum_fcoe_crc": "off [fixed]", "tx_checksum_ip_generic": "on [fixed]", "tx_fcoe_segmentation": "off [fixed]", "rx_vlan_filter": "off [fixed]", "receive_hashing": "off [fixed]", "tx_gre_segmentation": "off [fixed]"}, "mtu": 65536, "device": "lo", "promisc": false, "ipv4": {"broadcast": "host", "netmask": "255.0.0.0", "network": "127.0.0.0", "address": "127.0.0.1"}, "active": true, "type": "loopback"}, "ansible_userspace_bits": "64", "ansible_architecture": "x86_64", "ansible_real_user_id": 0, "ansible_default_ipv4": {"macaddress": "02:00:17:01:6c:99", "network": "172.16.0.0", "mtu": 9000, "broadcast": "172.16.0.255", "alias": "ens3", "netmask": "255.255.255.0", "address": "172.16.0.26", "interface": "ens3", "type": "ether", "gateway": "172.16.0.1"}, "ansible_swapfree_mb": 8191, "ansible_default_ipv6": {}, "ansible_distribution_release": "NA", "ansible_system_vendor": "QEMU", "ansible_apparmor": {"status": "disabled"}, "ansible_cmdline": {"LANG": "en_US.UTF-8", "ro": true, "BOOT_IMAGE": "/boot/vmlinuz-4.1.12-124.14.5.el7uek.x86_64", "transparent_hugepage": "never", "iscsi_param": "node.session.timeo.replacement_timeout=6000", "ipmi_si.trydmi": "0", "root": "UUID=8e49bc6b-e56a-4442-bc6f-5de825a5781b", "rd.dm": "0", "rd.md": "0", "network-config": "e2NvbmZpZzogZGlzYWJsZWR9Cg==", "ipmi_si.tryacpi": "0", "rd.luks": "0", "crashkernel": "auto", "console": "ttyS0,9600", "netroot": "iscsi:169.254.0.2:::1:iqn.2015-02.oracle.boot:uefi", "net.ifnames": "1", "ipmi_si.trydefaults": "0", "nvme_core.shutdown_timeout": "10", "rd.lvm": "0"}, "ansible_effective_user_id": 0, "ansible_mounts": [{"uuid": "8e49bc6b-e56a-4442-bc6f-5de825a5781b", "size_total": 40861921280, "mount": "/", "size_available": 39126233088, "fstype": "xfs", "device": "/dev/sda3", "options": "rw,seclabel,relatime,attr2,inode64,noquota"}, {"uuid": "E6B8-ACAB", "size_total": 536584192, "mount": "/boot/efi", "size_available": 526336000, "fstype": "vfat", "device": "/dev/sda1", "options": "rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=ascii,shortname=winnt,errors=remount-ro"}], "ansible_selinux": {"status": "enabled", "policyvers": 29, "type": "targeted", "mode": "enforcing", "config_mode": "enforcing"}, "ansible_os_family": "RedHat", "ansible_userspace_architecture": "x86_64", "ansible_product_uuid": "70128CA5-A270-4FEB-8714-8FFF6E5BEF2C", "ansible_kernel": "4.1.12-124.14.5.el7uek.x86_64", "ansible_product_name": "Standard PC (i440FX + PIIX, 1996)", "ansible_pkg_mgr": "yum", "ansible_memfree_mb": 14285, "ansible_devices": {"sda": {"scheduler_mode": "deadline", "rotational": "1", "vendor": "ORACLE", "sectors": "97677312", "sas_device_handle": null, "sas_address": null, "host": "", "sectorsize": "512", "removable": "0", "support_discard": "0", "model": "BlockVolume", "partitions": {"sda2": {"sectorsize": 512, "uuid": "c70aa3a9-dcf7-4a87-9a0f-ef202eaec18c", "sectors": "16777216", "start": "1050624", "holders": [], "size": "8.00 GB"}, "sda3": {"sectorsize": 512, "uuid": "8e49bc6b-e56a-4442-bc6f-5de825a5781b", "sectors": "79847424", "start": "17827840", "holders": [], "size": "38.07 GB"}, "sda1": {"sectorsize": 512, "uuid": "E6B8-ACAB", "sectors": "1048576", "start": "2048", "holders": [], "size": "512.00 MB"}}, "holders": [], "size": "46.58 GB"}}, "ansible_user_uid": 0, "ansible_lvm": {"lvs": {}, "vgs": {}}, "ansible_distribution": "OracleLinux", "ansible_env": {"USERNAME": "root", "LANG": "en_US.UTF-8", "TERM": "xterm-256color", "SHELL": "/bin/bash", "SUDO_COMMAND": "/bin/sh -c echo BECOME-SUCCESS-jdvryjtcxjpyaazultqlvqxsxdxvnwcu; /usr/bin/python /home/opc/.ansible/tmp/ansible-tmp-1526442649.03-36447815015428/setup.py; rm -rf \\"/home/opc/.ansible/tmp/ansible-tmp-1526442649.03-36447815015428/\\" > /dev/null 2>&1", "SHLVL": "1", "SUDO_UID": "1000", "SUDO_GID": "1000", "PWD": "/home/opc", "LOGNAME": "root", "USER": "root", "PATH": "/sbin:/bin:/usr/sbin:/usr/bin", "MAIL": "/var/mail/opc", "SUDO_USER": "opc", "LS_COLORS": "rs=0:di=38;5;27:ln=38;5;51:mh=44;38;5;15:pi=40;38;5;11:so=38;5;13:do=38;5;5:bd=48;5;232;38;5;11:cd=48;5;232;38;5;3:or=48;5;232;38;5;9:mi=05;48;5;232;38;5;15:su=48;5;196;38;5;15:sg=48;5;11;38;5;16:ca=48;5;196;38;5;226:tw=48;5;10;38;5;16:ow=48;5;10;38;5;21:st=48;5;21;38;5;15:ex=38;5;34:*.tar=38;5;9:*.tgz=38;5;9:*.arc=38;5;9:*.arj=38;5;9:*.taz=38;5;9:*.lha=38;5;9:*.lz4=38;5;9:*.lzh=38;5;9:*.lzma=38;5;9:*.tlz=38;5;9:*.txz=38;5;9:*.tzo=38;5;9:*.t7z=38;5;9:*.zip=38;5;9:*.z=38;5;9:*.Z=38;5;9:*.dz=38;5;9:*.gz=38;5;9:*.lrz=38;5;9:*.lz=38;5;9:*.lzo=38;5;9:*.xz=38;5;9:*.bz2=38;5;9:*.bz=38;5;9:*.tbz=38;5;9:*.tbz2=38;5;9:*.tz=38;5;9:*.deb=38;5;9:*.rpm=38;5;9:*.jar=38;5;9:*.war=38;5;9:*.ear=38;5;9:*.sar=38;5;9:*.rar=38;5;9:*.alz=38;5;9:*.ace=38;5;9:*.zoo=38;5;9:*.cpio=38;5;9:*.7z=38;5;9:*.rz=38;5;9:*.cab=38;5;9:*.jpg=38;5;13:*.jpeg=38;5;13:*.gif=38;5;13:*.bmp=38;5;13:*.pbm=38;5;13:*.pgm=38;5;13:*.ppm=38;5;13:*.tga=38;5;13:*.xbm=38;5;13:*.xpm=38;5;13:*.tif=38;5;13:*.tiff=38;5;13:*.png=38;5;13:*.svg=38;5;13:*.svgz=38;5;13:*.mng=38;5;13:*.pcx=38;5;13:*.mov=38;5;13:*.mpg=38;5;13:*.mpeg=38;5;13:*.m2v=38;5;13:*.mkv=38;5;13:*.webm=38;5;13:*.ogm=38;5;13:*.mp4=38;5;13:*.m4v=38;5;13:*.mp4v=38;5;13:*.vob=38;5;13:*.qt=38;5;13:*.nuv=38;5;13:*.wmv=38;5;13:*.asf=38;5;13:*.rm=38;5;13:*.rmvb=38;5;13:*.flc=38;5;13:*.avi=38;5;13:*.fli=38;5;13:*.flv=38;5;13:*.gl=38;5;13:*.dl=38;5;13:*.xcf=38;5;13:*.xwd=38;5;13:*.yuv=38;5;13:*.cgm=38;5;13:*.emf=38;5;13:*.axv=38;5;13:*.anx=38;5;13:*.ogv=38;5;13:*.ogx=38;5;13:*.aac=38;5;45:*.au=38;5;45:*.flac=38;5;45:*.mid=38;5;45:*.midi=38;5;45:*.mka=38;5;45:*.mp3=38;5;45:*.mpc=38;5;45:*.ogg=38;5;45:*.ra=38;5;45:*.wav=38;5;45:*.axa=38;5;45:*.oga=38;5;45:*.spx=38;5;45:*.xspf=38;5;45:", "HOME": "/root", "_": "/usr/bin/python"}, "ansible_distribution_major_version": "7", "module_setup": true, "ansible_processor_count": 1, "ansible_hostname": "oel7-2", "ansible_effective_group_id": 0, "ansible_swaptotal_mb": 8191, "ansible_real_group_id": 0, "ansible_bios_date": "02/06/2015", "ansible_all_ipv6_addresses": [], "ansible_interfaces": ["lo", "ens3"], "ansible_uptime_seconds": 360054, "ansible_machine_id": "70128ca5a2704feb87148fff6e5bef2c", "ansible_ssh_host_key_rsa_public": "AAAAB3NzaC1yc2EAAAADAQABAAABAQC6trAGn2iSED/BDxE5bM6vY3SHh68zs27/CTmR0Xf2hT2f9D33EL68Bz8cYn1LVP+ZgzCG9UseQNclWsHs1Ypc/XDDhOSryN+MvTja22KQ4LfqHQ/b7p69Xd4dBzNNbMlF/V5dqr9GKvrkojrZtbn2WBcTlu7oG1DkZDtbDBq/+r+L35JXSt0RlfsTx8KMT8uSHJAe3s1TAw3jKmrBL+edtLXLTQzOM/ajRkb72KX9h6fOLqo6O2QASbLHvAmHvMGdJ+h9Ox4be0NeClAqEcOw+OsWbqGWuyGlAqKyTYZyBzSZUkzKoPhNClMuI1k/QBFcL7Aj8iKoU74qT4vC30V3", "ansible_gather_subset": ["hardware", "network", "virtual"], "ansible_user_gecos": "root", "ansible_system_capabilities_enforced": "True", "ansible_python": {"executable": "/usr/bin/python", "version": {"micro": 5, "major": 2, "releaselevel": "final", "serial": 0, "minor": 7}, "type": "CPython", "has_sslcontext": true, "version_info": [2, 7, 5, "final", 0]}, "ansible_machine": "x86_64", "ansible_processor_threads_per_core": 2, "ansible_fqdn": "oel7-2.uscp1sbxitiout.uscp1sbxitiout.oraclevcn.com", "ansible_user_gid": 0, "ansible_memory_mb": {"real": {"total": 14778, "used": 493, "free": 14285}, "swap": {"cached": 0, "total": 8191, "free": 8191, "used": 0}, "nocache": {"used": 247, "free": 14531}}, "ansible_nodename": "oel7-2", "ansible_system": "Linux", "ansible_user_shell": "/bin/bash", "ansible_system_capabilities": ["cap_chown", "cap_dac_override", "cap_dac_read_search", "cap_fowner", "cap_fsetid", "cap_kill", "cap_setgid", "cap_setuid", "cap_setpcap", "cap_linux_immutable", "cap_net_bind_service", "cap_net_broadcast", "cap_net_admin", "cap_net_raw", "cap_ipc_lock", "cap_ipc_owner", "cap_sys_module", "cap_sys_rawio", "cap_sys_chroot", "cap_sys_ptrace", "cap_sys_pacct", "cap_sys_admin", "cap_sys_boot", "cap_sys_nice", "cap_sys_resource", "cap_sys_time", "cap_sys_tty_config", "cap_mknod", "cap_lease", "cap_audit_write", "cap_audit_control", "cap_setfcap", "cap_mac_override", "cap_mac_admin", "cap_syslog", "35", "36", "37+ep"], "ansible_ens3": {"macaddress": "02:00:17:01:6c:99", "features": {"tx_checksum_ipv4": "on", "generic_receive_offload": "on", "tx_checksum_ipv6": "on", "tx_scatter_gather_fraglist": "off [fixed]", "rx_all": "off [fixed]", "highdma": "on [fixed]", "rx_fcs": "off [fixed]", "tx_lockless": "off [fixed]", "tx_tcp_ecn_segmentation": "off [fixed]", "tx_tcp6_segmentation": "on", "tx_gso_robust": "off [fixed]", "tx_ipip_segmentation": "on", "tx_checksumming": "on", "vlan_challenged": "off [fixed]", "hw_switch_offload": "off [fixed]", "loopback": "off [fixed]", "fcoe_mtu": "off [fixed]", "tx_checksum_sctp": "off [fixed]", "tx_vlan_stag_hw_insert": "on", "rx_vlan_stag_hw_parse": "off [requested on]", "rx_vlan_stag_filter": "off [fixed]", "large_receive_offload": "on", "tx_scatter_gather": "on", "rx_checksumming": "on", "tx_tcp_segmentation": "on", "netns_local": "off [fixed]", "busy_poll": "off [fixed]", "generic_segmentation_offload": "on", "tx_udp_tnl_segmentation": "on", "tcp_segmentation_offload": "on", "l2_fwd_offload": "off [fixed]", "rx_vlan_offload": "off [requested on]", "ntuple_filters": "on", "tx_vlan_offload": "on", "tx_nocache_copy": "off", "udp_fragmentation_offload": "off [fixed]", "scatter_gather": "on", "tx_sit_segmentation": "on", "tx_checksum_fcoe_crc": "off [fixed]", "tx_checksum_ip_generic": "off [fixed]", "tx_fcoe_segmentation": "off [fixed]", "rx_vlan_filter": "off [fixed]", "receive_hashing": "on", "tx_gre_segmentation": "on"}, "type": "ether", "pciid": "0000:00:03.0", "module": "bnxt_en", "mtu": 9000, "device": "ens3", "promisc": false, "ipv4": {"broadcast": "172.16.0.255", "netmask": "255.255.255.0", "network": "172.16.0.0", "address": "172.16.0.26"}, "active": true, "speed": 25000}, "ansible_all_ipv4_addresses": ["172.16.0.26"], "ansible_python_version": "2.7.5"}}\r\n', 'OpenSSH_7.4p1, LibreSSL 2.5.0\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 53: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 50581\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\nShared connection to 129.213.47.235 closed.\r\n')
ok: [129.213.47.235]
META: ran handlers
TASK [debug] ********************************************************************************************************************************************************************************************
task path: /Users/opc/ansible/OEL7/ptest.yml:10
ok: [129.213.47.235] => {
    "changed": false, 
    "hello.stdout_lines": "VARIABLE IS NOT DEFINED!"
META: ran handlers
META: ran handlers
PLAY RECAP **********************************************************************************************************************************************************************************************
129.213.47.235             : ok=2    changed=0    unreachable=0    failed=0   
          

PLAY [OEL7] **********************************************************************************************************************

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

TASK [debug] *********************************************************************************************************************
ok: [129.213.47.235] => {
"changed": false,
"hello": "VARIABLE IS NOT DEFINED!"

PLAY RECAP ***********************************************************************************************************************
129.213.47.235 : ok=2 changed=0 unreachable=0 failed=0

Is This A Bug?

Thanks very much for your submission to Ansible. It sincerely means a lot to us.

We're not sure this is a bug, and we don't mean for this to be confrontational. Let's explain what we're thinking:

  • Ansible 2.3.0.0 is no longer supported, please try on the latest Ansible release
  • I am able to run that playbook you posted it works fine, even on 2.3.0.0
  • The output you posted indicated the shell task didn't run so no hello is never registered
  • As such, we're going to close this ticket. However, we're open to being corrected, should you wish to discuss. You can stop by one of our two mailing lists
    to talk about this and we might be persuaded otherwise.

  • https://groups.google.com/forum/#!forum/ansible-project - for user questions, tips, and tricks
  • https://groups.google.com/forum/#!forum/ansible-devel - for strategy, future planning, and questions about writing code
  • Comments on closed tickets aren't something we monitor, so if you do disagree with this, a mailing list thread is probably appropriate.

    Thank you once again for this and your interest in Ansible!

    Look closely, you can see your output

    PLAY [OEL7] **********************************************************************************************************************
    TASK [Gathering Facts] ***********************************************************************************************************
    ok: [129.213.47.235]
    TASK [debug] *********************************************************************************************************************
    ok: [129.213.47.235] => {
    "changed": false,
    "hello": "VARIABLE IS NOT DEFINED!"
    PLAY RECAP ***********************************************************************************************************************
    129.213.47.235 : ok=2 changed=0 unreachable=0 failed=0
    

    It goes straight from gathering facts to the debug task, skipping your shell task where the variable is registered. This is why the debug task is saying the variable isn't defined.

    Compare this to the run of the following playbook

    - hosts: localhost tasks: - name: 1.1.18 - Ensure sticky bit is set on all world-writable directories - changed_when false shell: echo "hello" register: hello - debug: var: "hello.stdout_lines" changed_when: False

    Here is the output

    (ansible-py36) jborean:~/dev/module-tester$ ansible-playbook adhoc.yml -vvv
    ansible-playbook 2.6.0dev0 (win_update-scheduled-task 4fc04c3057) last updated 2018/05/23 10:22:11 (GMT +1000)
      config file = /Users/jborean/dev/module-tester/ansible.cfg
      configured module search path = ['/Users/jborean/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
      ansible python module location = /Users/jborean/dev/ansible/lib/ansible
      executable location = /Users/jborean/venvs/ansible-py36/bin/ansible-playbook
      python version = 3.6.4 (default, Jan 18 2018, 12:35:18) [GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.39.2)]
    Using /Users/jborean/dev/module-tester/ansible.cfg as config file
    Parsed /Users/jborean/dev/module-tester/inventory.ini inventory source with ini plugin
    PLAYBOOK: adhoc.yml **********************************************************************************************************************
    1 plays in adhoc.yml
    PLAY [localhost] *************************************************************************************************************************
    TASK [Gathering Facts] *******************************************************************************************************************
    task path: /Users/jborean/dev/module-tester/adhoc.yml:2
    <127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: jborean
    <127.0.0.1> EXEC /bin/sh -c 'echo ~jborean && sleep 0'
    <127.0.0.1> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /Users/jborean/.ansible/tmp/ansible-tmp-1527046111.696886-64428552952320 `" && echo ansible-tmp-1527046111.696886-64428552952320="` echo /Users/jborean/.ansible/tmp/ansible-tmp-1527046111.696886-64428552952320 `" ) && sleep 0'
    Using module file /Users/jborean/dev/ansible/lib/ansible/modules/system/setup.py
    <127.0.0.1> PUT /Users/jborean/.ansible/tmp/ansible-local-45159d6ibf7t6/tmpforj5z7_ TO /Users/jborean/.ansible/tmp/ansible-tmp-1527046111.696886-64428552952320/setup.py                                                                                                              
    <127.0.0.1> EXEC /bin/sh -c 'chmod u+x /Users/jborean/.ansible/tmp/ansible-tmp-1527046111.696886-64428552952320/ /Users/jborean/.ansible/tmp/ansible-tmp-1527046111.696886-64428552952320/setup.py && sleep 0'                                                                        
    <127.0.0.1> EXEC /bin/sh -c '/Users/jborean/venvs/ansible-py36/bin/python /Users/jborean/.ansible/tmp/ansible-tmp-1527046111.696886-64428552952320/setup.py && sleep 0'                                                                                                               
    <127.0.0.1> EXEC /bin/sh -c 'rm -f -r /Users/jborean/.ansible/tmp/ansible-tmp-1527046111.696886-64428552952320/ > /dev/null 2>&1 && sleep 0'                                                                                                                                          
    ok: [127.0.0.1]
    META: ran handlers
    TASK [1.1.18 - Ensure sticky bit is set on all world-writable directories - changed_when false] ******************************************
    task path: /Users/jborean/dev/module-tester/adhoc.yml:4
    <127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: jborean
    <127.0.0.1> EXEC /bin/sh -c 'echo ~jborean && sleep 0'
    <127.0.0.1> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /Users/jborean/.ansible/tmp/ansible-tmp-1527046112.988089-255445247835930 `" && echo ansible-tmp-1527046112.988089-255445247835930="` echo /Users/jborean/.ansible/tmp/ansible-tmp-1527046112.988089-255445247835930 `" ) && sleep 0'
    Using module file /Users/jborean/dev/ansible/lib/ansible/modules/commands/command.py
    <127.0.0.1> PUT /Users/jborean/.ansible/tmp/ansible-local-45159d6ibf7t6/tmpg35jdvw6 TO /Users/jborean/.ansible/tmp/ansible-tmp-1527046112.988089-255445247835930/command.py                                                                                                           
    <127.0.0.1> EXEC /bin/sh -c 'chmod u+x /Users/jborean/.ansible/tmp/ansible-tmp-1527046112.988089-255445247835930/ /Users/jborean/.ansible/tmp/ansible-tmp-1527046112.988089-255445247835930/command.py && sleep 0'                                                                    
    <127.0.0.1> EXEC /bin/sh -c '/Users/jborean/venvs/ansible-py36/bin/python /Users/jborean/.ansible/tmp/ansible-tmp-1527046112.988089-255445247835930/command.py && sleep 0'                                                                                                            
    <127.0.0.1> EXEC /bin/sh -c 'rm -f -r /Users/jborean/.ansible/tmp/ansible-tmp-1527046112.988089-255445247835930/ > /dev/null 2>&1 && sleep 0'                                                                                                                                         
    changed: [127.0.0.1] => {
        "changed": true,
        "cmd": "echo \"hello\"",
        "delta": "0:00:00.004631",
        "end": "2018-05-23 13:28:33.377080",
        "invocation": {
            "module_args": {
                "_raw_params": "echo \"hello\"",
                "_uses_shell": true,
                "argv": null,
                "chdir": null,
                "creates": null,
                "executable": null,
                "removes": null,
                "stdin": null,
                "warn": true
        "rc": 0,
        "start": "2018-05-23 13:28:33.372449",
        "stderr": "",
        "stderr_lines": [],
        "stdout": "hello",
        "stdout_lines": [
            "hello"
    TASK [debug] *****************************************************************************************************************************
    task path: /Users/jborean/dev/module-tester/adhoc.yml:8
    ok: [127.0.0.1] => {
        "hello.stdout_lines": [
            "hello"
    META: ran handlers
    META: ran handlers
    PLAY RECAP *******************************************************************************************************************************
    127.0.0.1                  : ok=3    changed=1    unreachable=0    failed=0
    

    I've even run this all the way back to 2.3.0.0 and they all work fine to me. My guess is you are specifying --tags "1.1.18" when calling ansible-playbook and this what is skipping your shell task from running.

    This is the last time I'll reply to this thread, please post further questions to IRC and the mailing list.