Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

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

"bad symbolic permission for mode:" error on directory creation #42563

Closed
mohag opened this issue Jul 10, 2018 · 7 comments
Closed

"bad symbolic permission for mode:" error on directory creation #42563

mohag opened this issue Jul 10, 2018 · 7 comments
Labels
affects_2.6 This issue/PR affects Ansible v2.6 bug This issue/PR relates to a bug. files Files category module This issue/PR relates to a module. support:core This issue/PR relates to code supported by the Ansible Engineering Team. traceback This issue/PR includes a traceback.

Comments

@mohag
Copy link

mohag commented Jul 10, 2018

SUMMARY

"bad symbolic permission for mode:" error when creating directories from an item list.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

file module

ANSIBLE VERSION
ansible 2.6.0
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/home/gertvnb/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/site-packages/ansible
  executable location = /usr/bin/ansible
  python version = 2.7.5 (default, Apr 11 2018, 07:36:10) [GCC 4.8.5 20150623 (Red Hat 4.8.5-28)]
CONFIGURATION

Default config

OS / ENVIRONMENT

Managing CentOS 7 from CentOS 7.

STEPS TO REPRODUCE
---
- hosts: master-db
  tasks:
  - name: Create directories for bind mounts
    file:
      path: "{{ item.path }}"
      owner: 27
      group: 27
      mode: "{{ item.mode }}"
      state: directory
    with_items:
    - path: /data/var_mysql
      mode: 0755
    - path: /data/mariadb_logs
      mode: 0750
EXPECTED RESULTS

Directories should be created with the correct permissions.

ACTUAL RESULTS

Directory creation fails with an error.

$ ansible-playbook playbook.yml -vvvv -b -K
ansible-playbook 2.6.0
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/home/username/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/site-packages/ansible
  executable location = /usr/bin/ansible-playbook
  python version = 2.7.5 (default, Apr 11 2018, 07:36:10) [GCC 4.8.5 20150623 (Red Hat 4.8.5-28)]
Using /etc/ansible/ansible.cfg as config file
SUDO password:
setting up inventory plugins
Parsed /etc/ansible/hosts inventory source with ini plugin
Loading callback plugin default of type stdout, v2.0 from /usr/lib/python2.7/site-packages/ansible/plugins/callback/default.pyc

PLAYBOOK: playbook.yml ************************************************************************************************************************
1 plays in playbook.yml

PLAY [master-db] ******************************************************************************************************************************

TASK [Gathering Facts] ************************************************************************************************************************
task path: /home/username/playbook.yml:2
<hostname.domain> ESTABLISH SSH CONNECTION FOR USER: None
<hostname.domain> 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 ConnectTimeout=10 -o ControlPath=/home/username/.ansible/cp/852d770feb hostname.domain '/bin/sh -c '"'"'echo ~ && sleep 0'"'"''
<hostname.domain> (0, '/home/username\n', 'OpenSSH_7.4p1, OpenSSL 1.0.2k-fips  26 Jan 2017\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 58: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug1: Control socket "/home/username/.ansible/cp/852d770feb" does not exist\r\ndebug2: resolving "hostname.domain" port 22\r\ndebug2: ssh_connect_direct: needpriv 0\r\ndebug1: Connecting to hostname.domain [196.23.100.99] port 22.\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug1: fd 3 clearing O_NONBLOCK\r\ndebug1: Connection established.\r\ndebug3: timeout: 10000 ms remain after connect\r\ndebug1: key_load_public: No such file or directory\r\ndebug1: identity file /home/username/.ssh/id_rsa type -1\r\ndebug1: key_load_public: No such file or directory\r\ndebug1: identity file /home/username/.ssh/id_rsa-cert type -1\r\ndebug1: key_load_public: No such file or directory\r\ndebug1: identity file /home/username/.ssh/id_dsa type -1\r\ndebug1: key_load_public: No such file or directory\r\ndebug1: identity file /home/username/.ssh/id_dsa-cert type -1\r\ndebug1: key_load_public: No such file or directory\r\ndebug1: identity file /home/username/.ssh/id_ecdsa type -1\r\ndebug1: key_load_public: No such file or directory\r\ndebug1: identity file /home/username/.ssh/id_ecdsa-cert type -1\r\ndebug1: key_load_public: No such file or directory\r\ndebug1: identity file /home/username/.ssh/id_ed25519 type -1\r\ndebug1: key_load_public: No such file or directory\r\ndebug1: identity file /home/username/.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 hostname.domain:22 as \'username\'\r\ndebug3: hostkeys_foreach: reading file "/home/username/.ssh/known_hosts"\r\ndebug3: record_hostkey: found key type ECDSA in file /home/username/.ssh/known_hosts:16\r\ndebug3: load_hostkeys: loaded 1 keys from hostname.domain\r\ndebug3: hostkeys_foreach: reading file "/etc/ssh/ssh_known_hosts"\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,diffie-hellman-group1-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-dss-cert-v01@openssh.com,ssh-ed25519,rsa-sha2-512,rsa-sha2-256,ssh-rsa,ssh-dss\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@libssh.org,diffie-hellman-group-exchange-sha256\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,aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr\r\ndebug2: ciphers stoc: chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr\r\ndebug2: MACs ctos: hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-ripemd160-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-512,hmac-sha2-256,hmac-ripemd160,umac-128@openssh.com,hmac-sha1\r\ndebug2: MACs stoc: hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-ripemd160-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-512,hmac-sha2-256,hmac-ripemd160,umac-128@openssh.com,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@libssh.org\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\ndebug1: kex: curve25519-sha256@libssh.org need=64 dh_need=64\r\ndebug1: kex: curve25519-sha256@libssh.org need=64 dh_need=64\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:iC8x+F4+wYQnf4g60JGXyLL5FMWVUJ6uQr5hvthkoPo\r\ndebug3: hostkeys_foreach: reading file "/home/username/.ssh/known_hosts"\r\ndebug3: record_hostkey: found key type ECDSA in file /home/username/.ssh/known_hosts:16\r\ndebug3: load_hostkeys: loaded 1 keys from hostname.domain\r\ndebug3: hostkeys_foreach: reading file "/etc/ssh/ssh_known_hosts"\r\ndebug3: hostkeys_foreach: reading file "/home/username/.ssh/known_hosts"\r\ndebug3: hostkeys_foreach: reading file "/etc/ssh/ssh_known_hosts"\r\ndebug3: record_hostkey: found key type RSA in file /etc/ssh/ssh_known_hosts:59\r\ndebug3: record_hostkey: found key type ECDSA in file /etc/ssh/ssh_known_hosts:60\r\ndebug3: record_hostkey: found key type ED25519 in file /etc/ssh/ssh_known_hosts:61\r\ndebug3: load_hostkeys: loaded 3 keys from 196.23.100.99\r\ndebug1: Host \'hostname.domain\' is known and matches the ECDSA host key.\r\ndebug1: Found key in /home/username/.ssh/known_hosts:16\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: Key comment (potentially sensitive hash value), agent\r\ndebug2: key: /home/username/.ssh/id_rsa ((nil))\r\ndebug2: key: /home/username/.ssh/id_dsa ((nil))\r\ndebug2: key: /home/username/.ssh/id_ecdsa ((nil))\r\ndebug2: key: /home/username/.ssh/id_ed25519 ((nil))\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\r\ndebug3: start over, passed a different list publickey\r\ndebug3: preferred gssapi-with-mic,gssapi-keyex,hostbased,publickey\r\ndebug3: authmethod_lookup publickey\r\ndebug3: remaining preferred: ,gssapi-keyex,hostbased,publickey\r\ndebug3: authmethod_is_enabled publickey\r\ndebug1: Next authentication method: publickey\r\ndebug1: Offering RSA public key: rsa-key-20080813 Gert\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 533\r\ndebug2: input_userauth_pk_ok: fp SHA256:key_hash\r\ndebug3: sign_and_send_pubkey: RSA SHA256:key_hash\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 hostname.domain ([196.23.100.99]:22).\r\ndebug1: setting up multiplex master socket\r\ndebug3: muxserver_listen: temporary control path /home/username/.ansible/cp/852d770feb.WgklXAGmY4KHTa8r\r\ndebug2: fd 5 setting O_NONBLOCK\r\ndebug3: fd 5 is O_NONBLOCK\r\ndebug3: fd 5 is O_NONBLOCK\r\ndebug1: channel 0: new [/home/username/.ansible/cp/852d770feb]\r\ndebug3: muxserver_listen: mux listener channel 0 fd 5\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 2908\r\ndebug2: fd 5 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\ndebug2: fd 6 setting O_NONBLOCK\r\ndebug3: fd 6 is O_NONBLOCK\r\ndebug1: channel 1: new [mux-control]\r\ndebug3: channel_post_mux_listener: new mux channel 1 fd 6\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 = 2910\r\ndebug3: mux_client_request_session: session request sent\r\ndebug3: mux_master_read_cb: channel 1 packet type 0x10000002 len 91\r\ndebug2: process_mux_new_session: channel 1: request tty 0, X 0, agent 0, subsys 0, term "linux", cmd "/bin/sh -c \'echo ~ && sleep 0\'", env 1\r\ndebug3: process_mux_new_session: got fds stdin 7, stdout 8, stderr 9\r\ndebug2: fd 8 setting O_NONBLOCK\r\ndebug2: fd 9 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 environment.\r\ndebug1: Sending env LANG = en_ZA.UTF-8\r\ndebug2: channel 2: request env confirm 0\r\ndebug3: send packet: type 98\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 6/6 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: channel 1: status: The following connections are open:\r\n  #1 mux-control (t16 r-1 i3/0 o3/0 fd 6/6 cc -1)\r\n\r\ndebug2: set_control_persist_exit_time: schedule exit in 60 seconds\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\n')
<hostname.domain> ESTABLISH SSH CONNECTION FOR USER: None
<hostname.domain> 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 ConnectTimeout=10 -o ControlPath=/home/username/.ansible/cp/852d770feb hostname.domain '/bin/sh -c '"'"'( umask 77 && mkdir -p "` echo /home/username/.ansible/tmp/ansible-tmp-1531215474.01-59358816501063 `" && echo ansible-tmp-1531215474.01-59358816501063="` echo /home/username/.ansible/tmp/ansible-tmp-1531215474.01-59358816501063 `" ) && sleep 0'"'"''
<hostname.domain> (0, 'ansible-tmp-1531215474.01-59358816501063=/home/username/.ansible/tmp/ansible-tmp-1531215474.01-59358816501063\n', 'OpenSSH_7.4p1, OpenSSL 1.0.2k-fips  26 Jan 2017\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 58: 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 = 2910\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')
Using module file /usr/lib/python2.7/site-packages/ansible/modules/system/setup.py
<hostname.domain> PUT /home/username/.ansible/tmp/ansible-local-2897JhGHBI/tmpFg0SCK TO /home/username/.ansible/tmp/ansible-tmp-1531215474.01-59358816501063/setup.py
<hostname.domain> 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 ConnectTimeout=10 -o ControlPath=/home/username/.ansible/cp/852d770feb '[hostname.domain]'
<hostname.domain> (0, 'sftp> put /home/username/.ansible/tmp/ansible-local-2897JhGHBI/tmpFg0SCK /home/username/.ansible/tmp/ansible-tmp-1531215474.01-59358816501063/setup.py\n', 'OpenSSH_7.4p1, OpenSSL 1.0.2k-fips  26 Jan 2017\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 58: 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 = 2910\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 5 T:16 I:1\r\ndebug3: SSH_FXP_REALPATH . -> /home/username size 0\r\ndebug3: Looking up /home/username/.ansible/tmp/ansible-local-2897JhGHBI/tmpFg0SCK\r\ndebug3: Sent message fd 5 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/username/.ansible/tmp/ansible-tmp-1531215474.01-59358816501063/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:32768\r\ndebug3: Sent message SSH2_FXP_WRITE I:8 O:131072 S:32768\r\ndebug3: Sent message SSH2_FXP_WRITE I:9 O:163840 S:32768\r\ndebug3: Sent message SSH2_FXP_WRITE I:10 O:196608 S:11464\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 32768 bytes at 98304\r\ndebug3: SSH2_FXP_STATUS 0\r\ndebug3: In write loop, ack for 8 32768 bytes at 131072\r\ndebug3: SSH2_FXP_STATUS 0\r\ndebug3: In write loop, ack for 9 32768 bytes at 163840\r\ndebug3: SSH2_FXP_STATUS 0\r\ndebug3: In write loop, ack for 10 11464 bytes at 196608\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')
<hostname.domain> ESTABLISH SSH CONNECTION FOR USER: None
<hostname.domain> 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 ConnectTimeout=10 -o ControlPath=/home/username/.ansible/cp/852d770feb hostname.domain '/bin/sh -c '"'"'chmod u+x /home/username/.ansible/tmp/ansible-tmp-1531215474.01-59358816501063/ /home/username/.ansible/tmp/ansible-tmp-1531215474.01-59358816501063/setup.py && sleep 0'"'"''
<hostname.domain> (0, '', 'OpenSSH_7.4p1, OpenSSL 1.0.2k-fips  26 Jan 2017\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 58: 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 = 2910\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')
<hostname.domain> ESTABLISH SSH CONNECTION FOR USER: None
<hostname.domain> 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 ConnectTimeout=10 -o ControlPath=/home/username/.ansible/cp/852d770feb -tt hostname.domain '/bin/sh -c '"'"'sudo -H -S  -p "[sudo via ansible, key=nxnlrvlhuqabwajnyfioiihzojdpbmtz] password: " -u root /bin/sh -c '"'"'"'"'"'"'"'"'echo BECOME-SUCCESS-nxnlrvlhuqabwajnyfioiihzojdpbmtz; /usr/bin/python /home/username/.ansible/tmp/ansible-tmp-1531215474.01-59358816501063/setup.py'"'"'"'"'"'"'"'"' && sleep 0'"'"''
Escalation succeeded
<hostname.domain> (0, '\r\n\r\n{"invocation": {"module_args": {"filter": "*", "gather_subset": ["all"], "fact_path": "/etc/ansible/facts.d", "gather_timeout": 10}}, "ansible_facts": {"ansible_product_serial": "VMware-42 1d 9a 5e e3 de a4 83-fa 00 de 10 2e ab 52 ea", "ansible_form_factor": "Other", "ansible_user_gecos": "root", "ansible_distribution_file_parsed": true, "ansible_fips": false, "ansible_service_mgr": "systemd", "ansible_user_id": "root", "ansible_selinux_python_present": true, "ansible_userspace_bits": "64", "ansible_ssh_host_key_rsa_public": "AAAAB3NzaC1yc2EAAAADAQABAAABAQCtb5Rwlc3MSGZ9Oy7Y/sQU126b8eU61okT2BLaEFKZhupq+f1uuPnWwhmo5clv54utXpBXNxOr+wr/8lXPmdBOpt4xC1FpAENO8d8Ak9Ry+xo0FFlC3wtYoShYMz++Ni95Nl3igKemyqAki4jTM/RfrYYO78628KnEMWTLlmHrqzNrf+xwfya//dcBzDSHDjXmuzPJGs21HoeF5/B7qPJ92YvB0p2q3XuqYbD3C1P1cM6IxMGPlmb2pnBOr/XOyzZfHkj+4og4QMh7SXn3D7PlaH2hukIxFB6fTQYaWEzR+6z94QCcDky90GCTdYwRTuE9FeKI4/XtlNGG6zENFAR1", "gather_subset": ["all"], "ansible_architecture": "x86_64", "ansible_local": {}, "ansible_distribution_version": "7.5.1804", "ansible_domain": "domain", "ansible_distribution_file_path": "/etc/redhat-release", "ansible_user_shell": "/bin/bash", "ansible_virtualization_type": "VMware", "ansible_real_user_id": 0, "ansible_processor_cores": 2, "ansible_virtualization_role": "guest", "ansible_distribution_file_variety": "RedHat", "ansible_dns": {"nameservers": ["168.210.2.2", "196.14.239.2"], "search": ["domain"]}, "ansible_effective_group_id": 0, "ansible_is_chroot": false, "ansible_bios_version": "6.00", "ansible_processor": ["0", "GenuineIntel", "Intel(R) Xeon(R) CPU E5-4650 0 @ 2.70GHz", "1", "GenuineIntel", "Intel(R) Xeon(R) CPU E5-4650 0 @ 2.70GHz", "2", "GenuineIntel", "Intel(R) Xeon(R) CPU E5-4650 0 @ 2.70GHz", "3", "GenuineIntel", "Intel(R) Xeon(R) CPU E5-4650 0 @ 2.70GHz"], "ansible_date_time": {"weekday_number": "2", "iso8601_basic_short": "20180710T113756", "tz": "SAST", "weeknumber": "28", "hour": "11", "year": "2018", "minute": "37", "tz_offset": "+0200", "month": "07", "epoch": "1531215476", "iso8601_micro": "2018-07-10T09:37:56.729499Z", "weekday": "Tuesday", "time": "11:37:56", "date": "2018-07-10", "iso8601": "2018-07-10T09:37:56Z", "day": "10", "iso8601_basic": "20180710T113756729373", "second": "56"}, "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", "rx_udp_tunnel_port_offload": "off [fixed]", "tx_tcp6_segmentation": "on", "tx_gso_robust": "off [fixed]", "tx_ipip_segmentation": "off [fixed]", "tx_tcp_mangleid_segmentation": "on", "tx_checksumming": "on", "vlan_challenged": "on [fixed]", "loopback": "on [fixed]", "fcoe_mtu": "off [fixed]", "scatter_gather": "on", "tx_checksum_sctp": "on [fixed]", "tx_vlan_stag_hw_insert": "off [fixed]", "rx_vlan_stag_hw_parse": "off [fixed]", "tx_gso_partial": "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_gre_csum_segmentation": "off [fixed]", "tx_nocache_copy": "off [fixed]", "tx_udp_tnl_csum_segmentation": "off [fixed]", "udp_fragmentation_offload": "on", "tx_sctp_segmentation": "on", "tx_sit_segmentation": "off [fixed]", "tx_checksum_fcoe_crc": "off [fixed]", "hw_tc_offload": "off [fixed]", "tx_checksum_ip_generic": "on [fixed]", "tx_fcoe_segmentation": "off [fixed]", "rx_vlan_filter": "off [fixed]", "tx_vlan_offload": "off [fixed]", "receive_hashing": "off [fixed]", "tx_gre_segmentation": "off [fixed]"}, "hw_timestamp_filters": [], "mtu": 65536, "device": "lo", "promisc": false, "timestamping": ["rx_software", "software"], "ipv4": {"broadcast": "host", "netmask": "255.0.0.0", "network": "127.0.0.0", "address": "127.0.0.1"}, "ipv6": [{"scope": "host", "prefix": "128", "address": "::1"}], "active": true, "type": "loopback"}, "ansible_memtotal_mb": 7822, "ansible_ssh_host_key_ecdsa_public": "AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBMhtZr4zf8ig+/VBMNVeWzSDY1F4OXWWYfkMVzcymTKwu42IAOhtB7P1D6t5YrUom0k3uQjedNXQnbq3Z7Mt1PE=", "ansible_device_links": {"masters": {"sda2": ["dm-0", "dm-1", "dm-2"], "sda3": ["dm-0", "dm-2"]}, "labels": {"dm-2": ["data"]}, "ids": {"sr0": ["ata-VMware_Virtual_IDE_CDROM_Drive_10000000000000000001"], "sda2": ["lvm-pv-uuid-acNzNH-qzdr-8Xi1-twFg-c8dx-n7G1-WHA335"], "sda3": ["lvm-pv-uuid-CLwrAF-84qH-bKeA-aub0-A9Ns-Ilbl-2JGuDI"], "dm-2": ["dm-name-centos-data", "dm-uuid-LVM-U5KrbSgmTA61MXxueEBqg9o8GQN1UHaG2YgYMQdDo3WtgWEABcUC3f2FtWAzOnGj"], "dm-0": ["dm-name-centos-root", "dm-uuid-LVM-U5KrbSgmTA61MXxueEBqg9o8GQN1UHaGRswZHZ0KRDkFaMcGCxPJhn2fCjTBPmX1"], "dm-1": ["dm-name-centos-swap", "dm-uuid-LVM-U5KrbSgmTA61MXxueEBqg9o8GQN1UHaGpCyqg1rCPbQ8GqHJpNzQurSmC78WDfv8"]}, "uuids": {"sda1": ["ba0eb67d-3fb3-4033-b818-1034dd31a081"], "dm-2": ["9bdb9bd5-270c-4fc4-ae84-28b6161f6910"], "dm-0": ["93ef1491-0e00-4021-8086-18e3a54505e7"], "dm-1": ["29fc5702-64cc-48b5-a876-64ef2c4cea7c"]}}, "ansible_default_ipv4": {"macaddress": "00:50:56:9d:70:54", "network": "196.23.100.96", "mtu": 1500, "broadcast": "196.23.100.127", "alias": "ens33", "netmask": "255.255.255.224", "address": "196.23.100.99", "interface": "ens33", "type": "ether", "gateway": "196.23.100.97"}, "ansible_swapfree_mb": 2047, "ansible_default_ipv6": {}, "ansible_distribution_release": "Core", "ansible_system_vendor": "VMware, Inc.", "ansible_os_family": "RedHat", "ansible_cmdline": {"LANG": "en_ZA.UTF-8", "BOOT_IMAGE": "/vmlinuz-3.10.0-862.6.3.el7.x86_64", "quiet": true, "rhgb": true, "rd.lvm.lv": "centos/swap", "crashkernel": "auto", "ro": true, "root": "/dev/mapper/centos-root"}, "ansible_effective_user_id": 0, "ansible_user_gid": 0, "ansible_selinux": {"status": "enabled", "policyvers": 31, "type": "targeted", "mode": "enforcing", "config_mode": "enforcing"}, "ansible_product_version": "None", "ansible_apparmor": {"status": "disabled"}, "ansible_userspace_architecture": "x86_64", "ansible_product_uuid": "421D9A5E-E3DE-A483-FA00-DE102EAB52EA", "ansible_fqdn": "hostname.domain", "ansible_system": "Linux", "ansible_pkg_mgr": "yum", "ansible_memfree_mb": 7238, "ansible_devices": {"fd0": {"scheduler_mode": "deadline", "rotational": "1", "vendor": null, "sectors": "8", "links": {"masters": [], "labels": [], "ids": [], "uuids": []}, "sas_device_handle": null, "sas_address": null, "virtual": 1, "host": "", "sectorsize": "512", "removable": "1", "support_discard": "0", "model": null, "partitions": {}, "holders": [], "size": "4.00 KB"}, "sr0": {"scheduler_mode": "deadline", "rotational": "1", "vendor": "NECVMWar", "sectors": "2097151", "links": {"masters": [], "labels": [], "ids": ["ata-VMware_Virtual_IDE_CDROM_Drive_10000000000000000001"], "uuids": []}, "sas_device_handle": null, "sas_address": null, "virtual": 1, "host": "IDE interface: Intel Corporation 82371AB/EB/MB PIIX4 IDE (rev 01)", "sectorsize": "512", "removable": "1", "support_discard": "0", "model": "VMware IDE CDR10", "partitions": {}, "holders": [], "size": "1024.00 MB"}, "sda": {"scheduler_mode": "deadline", "rotational": "1", "vendor": "VMware", "sectors": "1097596928", "links": {"masters": [], "labels": [], "ids": [], "uuids": []}, "sas_device_handle": null, "sas_address": null, "virtual": 1, "host": "SCSI storage controller: LSI Logic / Symbios Logic 53c1030 PCI-X Fusion-MPT Dual Ultra320 SCSI (rev 01)", "sectorsize": "512", "removable": "0", "support_discard": "0", "model": "Virtual disk", "partitions": {"sda2": {"sectorsize": 512, "uuid": null, "links": {"masters": ["dm-0", "dm-1", "dm-2"], "labels": [], "ids": ["lvm-pv-uuid-acNzNH-qzdr-8Xi1-twFg-c8dx-n7G1-WHA335"], "uuids": []}, "sectors": "40916992", "start": "1026048", "holders": ["centos-root", "centos-swap", "centos-data"], "size": "19.51 GB"}, "sda3": {"sectorsize": 512, "uuid": null, "links": {"masters": ["dm-0", "dm-2"], "labels": [], "ids": ["lvm-pv-uuid-CLwrAF-84qH-bKeA-aub0-A9Ns-Ilbl-2JGuDI"], "uuids": []}, "sectors": "1055653888", "start": "41943040", "holders": ["centos-root", "centos-data"], "size": "503.38 GB"}, "sda1": {"sectorsize": 512, "uuid": "ba0eb67d-3fb3-4033-b818-1034dd31a081", "links": {"masters": [], "labels": [], "ids": [], "uuids": ["ba0eb67d-3fb3-4033-b818-1034dd31a081"]}, "sectors": "1024000", "start": "2048", "holders": [], "size": "500.00 MB"}}, "holders": [], "size": "523.38 GB"}, "dm-2": {"scheduler_mode": "", "rotational": "1", "vendor": null, "sectors": "1013792768", "links": {"masters": [], "labels": ["data"], "ids": ["dm-name-centos-data", "dm-uuid-LVM-U5KrbSgmTA61MXxueEBqg9o8GQN1UHaG2YgYMQdDo3WtgWEABcUC3f2FtWAzOnGj"], "uuids": ["9bdb9bd5-270c-4fc4-ae84-28b6161f6910"]}, "sas_device_handle": null, "sas_address": null, "virtual": 1, "host": "", "sectorsize": "512", "removable": "0", "support_discard": "0", "model": null, "partitions": {}, "holders": [], "size": "483.41 GB"}, "dm-0": {"scheduler_mode": "", "rotational": "1", "vendor": null, "sectors": "78569472", "links": {"masters": [], "labels": [], "ids": ["dm-name-centos-root", "dm-uuid-LVM-U5KrbSgmTA61MXxueEBqg9o8GQN1UHaGRswZHZ0KRDkFaMcGCxPJhn2fCjTBPmX1"], "uuids": ["93ef1491-0e00-4021-8086-18e3a54505e7"]}, "sas_device_handle": null, "sas_address": null, "virtual": 1, "host": "", "sectorsize": "512", "removable": "0", "support_discard": "0", "model": null, "partitions": {}, "holders": [], "size": "37.46 GB"}, "dm-1": {"scheduler_mode": "", "rotational": "1", "vendor": null, "sectors": "4194304", "links": {"masters": [], "labels": [], "ids": ["dm-name-centos-swap", "dm-uuid-LVM-U5KrbSgmTA61MXxueEBqg9o8GQN1UHaGpCyqg1rCPbQ8GqHJpNzQurSmC78WDfv8"], "uuids": ["29fc5702-64cc-48b5-a876-64ef2c4cea7c"]}, "sas_device_handle": null, "sas_address": null, "virtual": 1, "host": "", "sectorsize": "512", "removable": "0", "support_discard": "0", "model": null, "partitions": {}, "holders": [], "size": "2.00 GB"}}, "ansible_user_uid": 0, "ansible_lvm": {"pvs": {"/dev/sda2": {"free_g": "0", "size_g": "19.51", "vg": "centos"}, "/dev/sda3": {"free_g": "0", "size_g": "503.37", "vg": "centos"}}, "lvs": {"data": {"size_g": "483.41", "vg": "centos"}, "root": {"size_g": "37.46", "vg": "centos"}, "swap": {"size_g": "2.00", "vg": "centos"}}, "vgs": {"centos": {"free_g": "0", "size_g": "522.88", "num_lvs": "3", "num_pvs": "2"}}}, "ansible_distribution": "CentOS", "ansible_user_dir": "/root", "ansible_env": {"USERNAME": "root", "LANG": "en_ZA.UTF-8", "TERM": "linux", "SHELL": "/bin/bash", "SUDO_COMMAND": "/bin/sh -c echo BECOME-SUCCESS-nxnlrvlhuqabwajnyfioiihzojdpbmtz; /usr/bin/python /home/username/.ansible/tmp/ansible-tmp-1531215474.01-59358816501063/setup.py", "SHLVL": "1", "SUDO_UID": "7952", "SUDO_GID": "100", "PWD": "/home/username", "LOGNAME": "root", "USER": "root", "PATH": "/sbin:/bin:/usr/sbin:/usr/bin", "MAIL": "/var/mail/username", "SUDO_USER": "username", "LS_COLORS": "rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=01;05;37;41:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=01;36:*.au=01;36:*.flac=01;36:*.mid=01;36:*.midi=01;36:*.mka=01;36:*.mp3=01;36:*.mpc=01;36:*.ogg=01;36:*.ra=01;36:*.wav=01;36:*.axa=01;36:*.oga=01;36:*.spx=01;36:*.xspf=01;36:", "HOME": "/root", "_": "/usr/bin/python"}, "ansible_distribution_major_version": "7", "module_setup": true, "ansible_processor_count": 2, "ansible_hostname": "hostname", "ansible_processor_vcpus": 4, "ansible_swaptotal_mb": 2047, "ansible_lsb": {}, "ansible_real_group_id": 0, "ansible_bios_date": "09/17/2015", "ansible_ens33": {"macaddress": "00:50:56:9d:70:54", "features": {"tx_checksum_ipv4": "off [fixed]", "generic_receive_offload": "on", "tx_checksum_ipv6": "off [fixed]", "tx_scatter_gather_fraglist": "off [fixed]", "rx_all": "off", "highdma": "off [fixed]", "rx_fcs": "off", "tx_lockless": "off [fixed]", "tx_tcp_ecn_segmentation": "off [fixed]", "rx_udp_tunnel_port_offload": "off [fixed]", "tx_tcp6_segmentation": "off [fixed]", "tx_gso_robust": "off [fixed]", "tx_ipip_segmentation": "off [fixed]", "tx_tcp_mangleid_segmentation": "off", "tx_checksumming": "on", "vlan_challenged": "off [fixed]", "loopback": "off [fixed]", "fcoe_mtu": "off [fixed]", "scatter_gather": "on", "tx_checksum_sctp": "off [fixed]", "tx_vlan_stag_hw_insert": "off [fixed]", "rx_vlan_stag_hw_parse": "off [fixed]", "tx_gso_partial": "off [fixed]", "rx_vlan_stag_filter": "off [fixed]", "large_receive_offload": "off [fixed]", "tx_scatter_gather": "on", "rx_checksumming": "off", "tx_tcp_segmentation": "on", "netns_local": "off [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": "on", "ntuple_filters": "off [fixed]", "tx_gre_csum_segmentation": "off [fixed]", "tx_nocache_copy": "off", "tx_udp_tnl_csum_segmentation": "off [fixed]", "udp_fragmentation_offload": "off [fixed]", "tx_sctp_segmentation": "off [fixed]", "tx_sit_segmentation": "off [fixed]", "tx_checksum_fcoe_crc": "off [fixed]", "hw_tc_offload": "off [fixed]", "tx_checksum_ip_generic": "on", "tx_fcoe_segmentation": "off [fixed]", "rx_vlan_filter": "on [fixed]", "tx_vlan_offload": "on [fixed]", "receive_hashing": "off [fixed]", "tx_gre_segmentation": "off [fixed]"}, "type": "ether", "pciid": "0000:02:01.0", "module": "e1000", "mtu": 1500, "device": "ens33", "promisc": false, "timestamping": ["tx_software", "rx_software", "software"], "ipv4": {"broadcast": "196.23.100.127", "netmask": "255.255.255.224", "network": "196.23.100.96", "address": "196.23.100.99"}, "ipv6": [{"scope": "link", "prefix": "64", "address": "fe80::250:56ff:fe9d:7054"}], "active": true, "speed": 1000, "hw_timestamp_filters": []}, "ansible_all_ipv6_addresses": ["fe80::250:56ff:fe9d:7054"], "ansible_interfaces": ["lo", "ens33"], "ansible_uptime_seconds": 3233, "ansible_machine_id": "e1b7ab29a4214ba689cd8b7387f5b316", "ansible_kernel": "3.10.0-862.6.3.el7.x86_64", "ansible_iscsi_iqn": "", "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_processor_threads_per_core": 1, "ansible_ssh_host_key_ed25519_public": "AAAAC3NzaC1lZDI1NTE5AAAAIHBWpxL+edhnXOMBX3b/eb06Cf1ZyrI5bUtEU3CuJiRB", "ansible_mounts": [{"block_used": 449673, "uuid": "93ef1491-0e00-4021-8086-18e3a54505e7", "size_total": 40217083904, "block_total": 9818624, "mount": "/", "block_available": 9368951, "size_available": 38375223296, "fstype": "xfs", "inode_total": 39284736, "options": "rw,seclabel,relatime,attr2,inode64,noquota", "device": "/dev/mapper/centos-root", "inode_used": 62892, "block_size": 4096, "inode_available": 39221844}, {"block_used": 30551, "uuid": "ba0eb67d-3fb3-4033-b818-1034dd31a081", "size_total": 520794112, "block_total": 127147, "mount": "/boot", "block_available": 96596, "size_available": 395657216, "fstype": "xfs", "inode_total": 512000, "options": "rw,seclabel,relatime,attr2,inode64,noquota", "device": "/dev/sda1", "inode_used": 333, "block_size": 4096, "inode_available": 511667}, {"block_used": 25107130, "uuid": "9bdb9bd5-270c-4fc4-ae84-28b6161f6910", "size_total": 510779637760, "block_total": 124702060, "mount": "/data", "block_available": 99594930, "size_available": 407940833280, "fstype": "ext4", "inode_total": 31686656, "options": "rw,seclabel,relatime,data=ordered", "device": "/dev/mapper/centos-data", "inode_used": 15, "block_size": 4096, "inode_available": 31686641}], "ansible_memory_mb": {"real": {"total": 7822, "used": 584, "free": 7238}, "swap": {"cached": 0, "total": 2047, "free": 2047, "used": 0}, "nocache": {"used": 240, "free": 7582}}, "ansible_nodename": "hostname.domain", "ansible_product_name": "VMware Virtual Platform", "ansible_machine": "x86_64", "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+ep"], "ansible_all_ipv4_addresses": ["196.23.100.99"], "ansible_python_version": "2.7.5"}}\r\n', 'OpenSSH_7.4p1, OpenSSL 1.0.2k-fips  26 Jan 2017\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 58: 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 = 2910\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 hostname.domain closed.\r\n')
<hostname.domain> ESTABLISH SSH CONNECTION FOR USER: None
<hostname.domain> 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 ConnectTimeout=10 -o ControlPath=/home/username/.ansible/cp/852d770feb hostname.domain '/bin/sh -c '"'"'rm -f -r /home/username/.ansible/tmp/ansible-tmp-1531215474.01-59358816501063/ > /dev/null 2>&1 && sleep 0'"'"''
<hostname.domain> (0, '', 'OpenSSH_7.4p1, OpenSSL 1.0.2k-fips  26 Jan 2017\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 58: 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 = 2910\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')
ok: [hostname.domain]
META: ran handlers

TASK [Create directories for bind mounts] *****************************************************************************************************
task path: /home/username/playbook.yml:4
<hostname.domain> ESTABLISH SSH CONNECTION FOR USER: None
<hostname.domain> 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 ConnectTimeout=10 -o ControlPath=/home/username/.ansible/cp/852d770feb hostname.domain '/bin/sh -c '"'"'echo ~ && sleep 0'"'"''
<hostname.domain> (0, '/home/username\n', 'OpenSSH_7.4p1, OpenSSL 1.0.2k-fips  26 Jan 2017\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 58: 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 = 2910\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')
<hostname.domain> ESTABLISH SSH CONNECTION FOR USER: None
<hostname.domain> 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 ConnectTimeout=10 -o ControlPath=/home/username/.ansible/cp/852d770feb hostname.domain '/bin/sh -c '"'"'( umask 77 && mkdir -p "` echo /home/username/.ansible/tmp/ansible-tmp-1531215477.26-120006722153191 `" && echo ansible-tmp-1531215477.26-120006722153191="` echo /home/username/.ansible/tmp/ansible-tmp-1531215477.26-120006722153191 `" ) && sleep 0'"'"''
<hostname.domain> (0, 'ansible-tmp-1531215477.26-120006722153191=/home/username/.ansible/tmp/ansible-tmp-1531215477.26-120006722153191\n', 'OpenSSH_7.4p1, OpenSSL 1.0.2k-fips  26 Jan 2017\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 58: 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 = 2910\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')
Using module file /usr/lib/python2.7/site-packages/ansible/modules/files/file.py
<hostname.domain> PUT /home/username/.ansible/tmp/ansible-local-2897JhGHBI/tmpDi0AKv TO /home/username/.ansible/tmp/ansible-tmp-1531215477.26-120006722153191/file.py
<hostname.domain> 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 ConnectTimeout=10 -o ControlPath=/home/username/.ansible/cp/852d770feb '[hostname.domain]'
<hostname.domain> (0, 'sftp> put /home/username/.ansible/tmp/ansible-local-2897JhGHBI/tmpDi0AKv /home/username/.ansible/tmp/ansible-tmp-1531215477.26-120006722153191/file.py\n', 'OpenSSH_7.4p1, OpenSSL 1.0.2k-fips  26 Jan 2017\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 58: 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 = 2910\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 5 T:16 I:1\r\ndebug3: SSH_FXP_REALPATH . -> /home/username size 0\r\ndebug3: Looking up /home/username/.ansible/tmp/ansible-local-2897JhGHBI/tmpDi0AKv\r\ndebug3: Sent message fd 5 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/username/.ansible/tmp/ansible-tmp-1531215477.26-120006722153191/file.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:8251\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 8251 bytes at 65536\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')
<hostname.domain> ESTABLISH SSH CONNECTION FOR USER: None
<hostname.domain> 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 ConnectTimeout=10 -o ControlPath=/home/username/.ansible/cp/852d770feb hostname.domain '/bin/sh -c '"'"'chmod u+x /home/username/.ansible/tmp/ansible-tmp-1531215477.26-120006722153191/ /home/username/.ansible/tmp/ansible-tmp-1531215477.26-120006722153191/file.py && sleep 0'"'"''
<hostname.domain> (0, '', 'OpenSSH_7.4p1, OpenSSL 1.0.2k-fips  26 Jan 2017\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 58: 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 = 2910\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')
<hostname.domain> ESTABLISH SSH CONNECTION FOR USER: None
<hostname.domain> 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 ConnectTimeout=10 -o ControlPath=/home/username/.ansible/cp/852d770feb -tt hostname.domain '/bin/sh -c '"'"'sudo -H -S  -p "[sudo via ansible, key=pcnwgxpjapnghvagljnhktwdymxcshyc] password: " -u root /bin/sh -c '"'"'"'"'"'"'"'"'echo BECOME-SUCCESS-pcnwgxpjapnghvagljnhktwdymxcshyc; /usr/bin/python /home/username/.ansible/tmp/ansible-tmp-1531215477.26-120006722153191/file.py'"'"'"'"'"'"'"'"' && sleep 0'"'"''
Escalation succeeded
<hostname.domain> (1, '\r\n\r\n{"exception": "  File \\"/tmp/ansible_VZrDfM/ansible_modlib.zip/ansible/module_utils/basic.py\\", line 1286, in set_mode_if_different\\n    mode = self._symbolic_mode_to_octal(path_stat, mode)\\n  File \\"/tmp/ansible_VZrDfM/ansible_modlib.zip/ansible/module_utils/basic.py\\", line 1432, in _symbolic_mode_to_octal\\n    raise ValueError(\\"bad symbolic permission for mode: %s\\" % mode)\\n", "group": "mysql", "uid": 27, "mode": "0755", "failed": true, "state": "directory", "gid": 27, "secontext": "unconfined_u:object_r:unlabeled_t:s0", "details": "bad symbolic permission for mode: 493", "invocation": {"module_args": {"directory_mode": null, "force": false, "remote_src": null, "_original_basename": null, "path": "/data/var_mysql", "owner": "27", "follow": true, "group": "27", "unsafe_writes": null, "state": "directory", "content": null, "serole": null, "setype": null, "selevel": null, "regexp": null, "src": null, "seuser": null, "recurse": false, "_diff_peek": null, "delimiter": null, "mode": "493", "attributes": null, "backup": null}}, "owner": "mysql", "path": "/data/var_mysql", "size": 4096, "msg": "mode must be in octal or symbolic form"}\r\n', 'OpenSSH_7.4p1, OpenSSL 1.0.2k-fips  26 Jan 2017\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 58: 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 = 2910\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 1\r\nShared connection to hostname.domain closed.\r\n')
<hostname.domain> ESTABLISH SSH CONNECTION FOR USER: None
<hostname.domain> 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 ConnectTimeout=10 -o ControlPath=/home/username/.ansible/cp/852d770feb hostname.domain '/bin/sh -c '"'"'rm -f -r /home/username/.ansible/tmp/ansible-tmp-1531215477.26-120006722153191/ > /dev/null 2>&1 && sleep 0'"'"''
<hostname.domain> (0, '', 'OpenSSH_7.4p1, OpenSSL 1.0.2k-fips  26 Jan 2017\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 58: 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 = 2910\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')
The full traceback is:
  File "/tmp/ansible_VZrDfM/ansible_modlib.zip/ansible/module_utils/basic.py", line 1286, in set_mode_if_different
    mode = self._symbolic_mode_to_octal(path_stat, mode)
  File "/tmp/ansible_VZrDfM/ansible_modlib.zip/ansible/module_utils/basic.py", line 1432, in _symbolic_mode_to_octal
    raise ValueError("bad symbolic permission for mode: %s" % mode)

failed: [hostname.domain] (item={u'path': u'/data/var_mysql', u'mode': 493}) => {
    "changed": false,
    "details": "bad symbolic permission for mode: 493",
    "gid": 27,
    "group": "mysql",
    "invocation": {
        "module_args": {
            "_diff_peek": null,
            "_original_basename": null,
            "attributes": null,
            "backup": null,
            "content": null,
            "delimiter": null,
            "directory_mode": null,
            "follow": true,
            "force": false,
            "group": "27",
            "mode": "493",
            "owner": "27",
            "path": "/data/var_mysql",
            "recurse": false,
            "regexp": null,
            "remote_src": null,
            "selevel": null,
            "serole": null,
            "setype": null,
            "seuser": null,
            "src": null,
            "state": "directory",
            "unsafe_writes": null
        }
    },
    "item": {
        "mode": 493,
        "path": "/data/var_mysql"
    },
    "mode": "0755",
    "msg": "mode must be in octal or symbolic form",
    "owner": "mysql",
    "path": "/data/var_mysql",
    "secontext": "unconfined_u:object_r:unlabeled_t:s0",
    "size": 4096,
    "state": "directory",
    "uid": 27
}
<hostname.domain> ESTABLISH SSH CONNECTION FOR USER: None
<hostname.domain> 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 ConnectTimeout=10 -o ControlPath=/home/username/.ansible/cp/852d770feb hostname.domain '/bin/sh -c '"'"'echo ~ && sleep 0'"'"''
<hostname.domain> (0, '/home/username\n', 'OpenSSH_7.4p1, OpenSSL 1.0.2k-fips  26 Jan 2017\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 58: 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 = 2910\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')
<hostname.domain> ESTABLISH SSH CONNECTION FOR USER: None
<hostname.domain> 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 ConnectTimeout=10 -o ControlPath=/home/username/.ansible/cp/852d770feb hostname.domain '/bin/sh -c '"'"'( umask 77 && mkdir -p "` echo /home/username/.ansible/tmp/ansible-tmp-1531215478.02-119805750639216 `" && echo ansible-tmp-1531215478.02-119805750639216="` echo /home/username/.ansible/tmp/ansible-tmp-1531215478.02-119805750639216 `" ) && sleep 0'"'"''
<hostname.domain> (0, 'ansible-tmp-1531215478.02-119805750639216=/home/username/.ansible/tmp/ansible-tmp-1531215478.02-119805750639216\n', 'OpenSSH_7.4p1, OpenSSL 1.0.2k-fips  26 Jan 2017\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 58: 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 = 2910\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')
Using module file /usr/lib/python2.7/site-packages/ansible/modules/files/file.py
<hostname.domain> PUT /home/username/.ansible/tmp/ansible-local-2897JhGHBI/tmpMaOSHz TO /home/username/.ansible/tmp/ansible-tmp-1531215478.02-119805750639216/file.py
<hostname.domain> 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 ConnectTimeout=10 -o ControlPath=/home/username/.ansible/cp/852d770feb '[hostname.domain]'
<hostname.domain> (0, 'sftp> put /home/username/.ansible/tmp/ansible-local-2897JhGHBI/tmpMaOSHz /home/username/.ansible/tmp/ansible-tmp-1531215478.02-119805750639216/file.py\n', 'OpenSSH_7.4p1, OpenSSL 1.0.2k-fips  26 Jan 2017\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 58: 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 = 2910\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 5 T:16 I:1\r\ndebug3: SSH_FXP_REALPATH . -> /home/username size 0\r\ndebug3: Looking up /home/username/.ansible/tmp/ansible-local-2897JhGHBI/tmpMaOSHz\r\ndebug3: Sent message fd 5 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/username/.ansible/tmp/ansible-tmp-1531215478.02-119805750639216/file.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:8254\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 8254 bytes at 65536\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')
<hostname.domain> ESTABLISH SSH CONNECTION FOR USER: None
<hostname.domain> 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 ConnectTimeout=10 -o ControlPath=/home/username/.ansible/cp/852d770feb hostname.domain '/bin/sh -c '"'"'chmod u+x /home/username/.ansible/tmp/ansible-tmp-1531215478.02-119805750639216/ /home/username/.ansible/tmp/ansible-tmp-1531215478.02-119805750639216/file.py && sleep 0'"'"''
<hostname.domain> (0, '', 'OpenSSH_7.4p1, OpenSSL 1.0.2k-fips  26 Jan 2017\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 58: 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 = 2910\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')
<hostname.domain> ESTABLISH SSH CONNECTION FOR USER: None
<hostname.domain> 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 ConnectTimeout=10 -o ControlPath=/home/username/.ansible/cp/852d770feb -tt hostname.domain '/bin/sh -c '"'"'sudo -H -S  -p "[sudo via ansible, key=lvmsqpfonzzynmzkkszggwfpkchwupvq] password: " -u root /bin/sh -c '"'"'"'"'"'"'"'"'echo BECOME-SUCCESS-lvmsqpfonzzynmzkkszggwfpkchwupvq; /usr/bin/python /home/username/.ansible/tmp/ansible-tmp-1531215478.02-119805750639216/file.py'"'"'"'"'"'"'"'"' && sleep 0'"'"''
Escalation succeeded
<hostname.domain> (1, '\r\n\r\n{"exception": "  File \\"/tmp/ansible_djIulr/ansible_modlib.zip/ansible/module_utils/basic.py\\", line 1286, in set_mode_if_different\\n    mode = self._symbolic_mode_to_octal(path_stat, mode)\\n  File \\"/tmp/ansible_djIulr/ansible_modlib.zip/ansible/module_utils/basic.py\\", line 1432, in _symbolic_mode_to_octal\\n    raise ValueError(\\"bad symbolic permission for mode: %s\\" % mode)\\n", "group": "mysql", "uid": 27, "mode": "0755", "failed": true, "state": "directory", "gid": 27, "secontext": "unconfined_u:object_r:unlabeled_t:s0", "details": "bad symbolic permission for mode: 488", "invocation": {"module_args": {"directory_mode": null, "force": false, "remote_src": null, "_original_basename": null, "path": "/data/mariadb_logs", "owner": "27", "follow": true, "group": "27", "unsafe_writes": null, "state": "directory", "content": null, "serole": null, "setype": null, "selevel": null, "regexp": null, "src": null, "seuser": null, "recurse": false, "_diff_peek": null, "delimiter": null, "mode": "488", "attributes": null, "backup": null}}, "owner": "mysql", "path": "/data/mariadb_logs", "size": 4096, "msg": "mode must be in octal or symbolic form"}\r\n', 'OpenSSH_7.4p1, OpenSSL 1.0.2k-fips  26 Jan 2017\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 58: 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 = 2910\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 1\r\nShared connection to hostname.domain closed.\r\n')
<hostname.domain> ESTABLISH SSH CONNECTION FOR USER: None
<hostname.domain> 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 ConnectTimeout=10 -o ControlPath=/home/username/.ansible/cp/852d770feb hostname.domain '/bin/sh -c '"'"'rm -f -r /home/username/.ansible/tmp/ansible-tmp-1531215478.02-119805750639216/ > /dev/null 2>&1 && sleep 0'"'"''
<hostname.domain> (0, '', 'OpenSSH_7.4p1, OpenSSL 1.0.2k-fips  26 Jan 2017\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 58: 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 = 2910\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')
The full traceback is:
  File "/tmp/ansible_djIulr/ansible_modlib.zip/ansible/module_utils/basic.py", line 1286, in set_mode_if_different
    mode = self._symbolic_mode_to_octal(path_stat, mode)
  File "/tmp/ansible_djIulr/ansible_modlib.zip/ansible/module_utils/basic.py", line 1432, in _symbolic_mode_to_octal
    raise ValueError("bad symbolic permission for mode: %s" % mode)

failed: [hostname.domain] (item={u'path': u'/data/mariadb_logs', u'mode': 488}) => {
    "changed": false,
    "details": "bad symbolic permission for mode: 488",
    "gid": 27,
    "group": "mysql",
    "invocation": {
        "module_args": {
            "_diff_peek": null,
            "_original_basename": null,
            "attributes": null,
            "backup": null,
            "content": null,
            "delimiter": null,
            "directory_mode": null,
            "follow": true,
            "force": false,
            "group": "27",
            "mode": "488",
            "owner": "27",
            "path": "/data/mariadb_logs",
            "recurse": false,
            "regexp": null,
            "remote_src": null,
            "selevel": null,
            "serole": null,
            "setype": null,
            "seuser": null,
            "src": null,
            "state": "directory",
            "unsafe_writes": null
        }
    },
    "item": {
        "mode": 488,
        "path": "/data/mariadb_logs"
    },
    "mode": "0755",
    "msg": "mode must be in octal or symbolic form",
    "owner": "mysql",
    "path": "/data/mariadb_logs",
    "secontext": "unconfined_u:object_r:unlabeled_t:s0",
    "size": 4096,
    "state": "directory",
    "uid": 27
}
        to retry, use: --limit @/home/username/playbook.retry

PLAY RECAP ************************************************************************************************************************************
hostname.domain         : ok=1    changed=0    unreachable=0    failed=1

Some additional notes: This happens irrespective of whether a user and group with UID and GID of 27 actually exists.

@ansibot
Copy link
Contributor

ansibot commented Jul 10, 2018

Files identified in the description:

If these files are inaccurate, please update the component name section of the description or use the !component bot command.

click here for bot help

@ansibot ansibot added affects_2.6 This issue/PR affects Ansible v2.6 bug This issue/PR relates to a bug. module This issue/PR relates to a module. needs_triage Needs a first human triage before being processed. support:core This issue/PR relates to code supported by the Ansible Engineering Team. traceback This issue/PR includes a traceback. labels Jul 10, 2018
@mohag
Copy link
Author

mohag commented Jul 10, 2018

It seems like a case of the mode being converted from octal to decimal and then failing due to being in decimal.

@mohag
Copy link
Author

mohag commented Jul 10, 2018

#31952 seems to be related.

The documentation seems to imply ("Giving Ansible a number without following one of these rules will end up with a decimal number which will have unexpected results.") that it will attempt to use the decimal number received. This does not seem to be the case. (I'm interpreting that as "777" decimal is different permissions from 0777 (octal) and using the former will result in different permission from the intended ones being set)

@mohag
Copy link
Author

mohag commented Jul 10, 2018

A warning instead of an error, or (if possible to detect) ignoring the error if the a variable substitution took place is one fix. (The second option would be nice - it can still error out if the user directly type 777 instead of 0777, but not if it came through a variable)

A relevant sample in the documentation is another. (Or a comment in the samples)

Another might be to allow the error to be overwritten with "force" or a new setting and mentioning that in the message.

There might be some rare use-cases for passing decimal modes, like the output of a tool fetching it from somewhere that stores the mode as a number and find it easier to output that directly than converting it to octal first.

@webknjaz webknjaz removed the needs_triage Needs a first human triage before being processed. label Jul 10, 2018
@ansibot ansibot added the files Files category label Mar 5, 2019
@ansibot
Copy link
Contributor

ansibot commented May 16, 2020

Files identified in the description:

If these files are incorrect, please update the component name section of the description or use the !component bot command.

click here for bot help

@mohag
Copy link
Author

mohag commented May 19, 2020

(In most cases nowadays I just use the mode as a string... The documentation can still do with some notes about that though...)

(The number that it gets converted to (with the loop I assume) is still valid permissions)

@s-hertel
Copy link
Contributor

s-hertel commented Jul 9, 2021

It looks like the documentation now warns that you should consider quoting it https://docs.ansible.com/ansible/latest/collections/ansible/builtin/file_module.html, so I'm going to close this as resolved.

@s-hertel s-hertel closed this as completed Jul 9, 2021
@ansible ansible locked and limited conversation to collaborators Aug 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.6 This issue/PR affects Ansible v2.6 bug This issue/PR relates to a bug. files Files category module This issue/PR relates to a module. support:core This issue/PR relates to code supported by the Ansible Engineering Team. traceback This issue/PR includes a traceback.
Projects
None yet
Development

No branches or pull requests

4 participants