$ ansible --version
ansible 1.9.4
configured module search path = None
$ cat /etc/redhat-release
CentOS Linux release 7.1.1503 (Core)-bash-4.1$ uname -a
SunOS dbservere4 5.11 11.1 sun4v sparc sun4v
-bash-4.1$ pfexec iduid=0(root) gid=0(root)
$ ANSIBLE_BECOME=True ANSIBLE_BECOME_METHOD=pfexec ansible server1 -m pingserver1 | FAILED => Internal Error: this module does not support running commands via pfexec
Ansible 1.9.4-------------
[willert@ws-willert ~]$ ANSIBLE_BECOME=True ANSIBLE_BECOME_METHOD=pfexec ansible dbservere4 -m ping -vvvv<dbservere4> ESTABLISH CONNECTION FOR USER: willert<dbservere4> REMOTE_MODULE ping<dbservere4> EXEC ssh -C -tt -vvv -o ControlMaster=auto -o ControlPersist=60s -o ControlPath="/home/willert/.ansible/cp/ansible-ssh-%h-%p-%r" -o StrictHostKeyChecking=no -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 dbservere4 /bin/sh -c 'mkdir -p /tmp/.ansible/tmp/ansible-tmp-1447400745.5-223125700098523 && chmod a+rx /tmp/.ansible/tmp/ansible-tmp-1447400745.5-223125700098523 && echo /tmp/.ansible/tmp/ansible-tmp-1447400745.5-223125700098523'<dbservere4> PUT /tmp/tmpXcrm98 TO /tmp/.ansible/tmp/ansible-tmp-1447400745.5-223125700098523/ping<dbservere4> EXEC ssh -C -tt -vvv -o ControlMaster=auto -o ControlPersist=60s -o ControlPath="/home/willert/.ansible/cp/ansible-ssh-%h-%p-%r" -o StrictHostKeyChecking=no -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 dbservere4 /bin/sh -c 'pfexec "'"'"'echo BECOME-SUCCESS-tnjzhxjycfjdyelcvpbxjdjxndkcfkfo; LANG=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 /usr/bin/python /tmp/.ansible/tmp/ansible-tmp-1447400745.5-223125700098523/ping; rm -rf /tmp/.ansible/tmp/ansible-tmp-1447400745.5-223125700098523/ >/dev/null 2>&1'"'"'"'dbservere4 | FAILED >> { "failed": true, "msg": "'echo BECOME-SUCCESS-tnjzhxjycfjdyelcvpbxjdjxndkcfkfo; LANG=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 /usr/bin/python /tmp/.ansible/tmp/ansible-tmp-1447400745.5-223125700098523/ping; rm -rf /tmp/.ansible/tmp/ansible-tmp-1447400745.5-223125700098523/ >/dev/null 2>&1': No such file or directory\r\nOpenSSH_6.6.1, OpenSSL 1.0.1e-fips 11 Feb 2013\r\ndebug1: Reading configuration data /home/willert/.ssh/config\r\ndebug1: /home/willert/.ssh/config line 1: Applying options for *\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 56: 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 = 3625\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 dbservere4 closed.\r\n", "parsed": false
Ansible 2.0.0 0.4.beta2-----------------------
$ ANSIBLE_BECOME=True ANSIBLE_BECOME_METHOD=pfexec ansible dbservere4 -m ping -vvvvUsing /home/willert/.ansible.cfg as config fileLoaded callback minimal of type stdout, v2.0<dbservere4> ESTABLISH SSH CONNECTION FOR USER: None<dbservere4> SSH: EXEC ssh -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/home/willert/.ansible/cp/ansible-ssh-%h-%p-%r -tt dbservere4 (umask 22 && mkdir -p "$(echo /tmp/.ansible/tmp/ansible-tmp-1447405023.72-289756827788)" && echo "$(echo /tmp/.ansible/tmp/ansible-tmp-1447405023.72-289756827788)")<dbservere4> PUT /tmp/tmpUF3jFS TO /tmp/.ansible/tmp/ansible-tmp-1447405023.72-289756827788/ping<dbservere4> SSH: EXEC sftp -b - -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/home/willert/.ansible/cp/ansible-ssh-%h-%p-%r [dbservere4]<dbservere4> ESTABLISH SSH CONNECTION FOR USER: None<dbservere4> SSH: EXEC ssh -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/home/willert/.ansible/cp/ansible-ssh-%h-%p-%r -tt dbservere4 /bin/sh -c 'pfexec "'"'"'echo BECOME-SUCCESS-bodchmhbolxfaduxknexdrmbouogwbjj; LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 /usr/bin/python /tmp/.ansible/tmp/ansible-tmp-1447405023.72-289756827788/ping; rm -rf "/tmp/.ansible/tmp/ansible-tmp-1447405023.72-289756827788/" > /dev/null 2>&1'"'"'"'dbservere4 | FAILED! => { "changed": false, "failed": true, "invocation": { "module_args": {}, "module_name": "ping" }, "msg": "'echo BECOME-SUCCESS-bodchmhbolxfaduxknexdrmbouogwbjj; LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 /usr/bin/python /tmp/.ansible/tmp/ansible-tmp-1447405023.72-289756827788/ping; rm -rf /tmp/.ansible/tmp/ansible-tmp-1447405023.72-289756827788/ > /dev/null 2>&1': No such file or directory\r\nOpenSSH_6.6.1, OpenSSL 1.0.1e-fips 11 Feb 2013\r\ndebug1: Reading configuration data /home/willert/.ssh/config\r\ndebug1: /home/willert/.ssh/config line 1: Applying options for *\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 56: 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 = 6655\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 dbservere4 closed.\r\n", "parsed": false}
-bash-4.1$ ls -ld /tmp/.ansible \> /tmp/.ansible/tmp \> /tmp/.ansible/tmp/ansible-tmp-1447405023.72-289756827788 \> /tmp/.ansible/tmp/ansible-tmp-1447405023.72-289756827788/ping
drwxr-xr-x 3 willert unixadm 177 Nov 13 08:44 /tmp/.ansibledrwxr-xr-x 7 willert unixadm 603 Nov 13 09:57 /tmp/.ansible/tmpdrwxr-xr-x 2 willert unixadm 178 Nov 13 09:57 /tmp/.ansible/tmp/ansible-tmp-1447405023.72-289756827788-rw------- 1 willert unixadm 72874 Nov 13 09:57 /tmp/.ansible/tmp/ansible-tmp-1447405023.72-289756827788/ping
[willert@localhost ~]$ ansible dbservere4 -m ping -vvvvUsing /home/willert/.ansible.cfg as config fileLoaded callback minimal of type stdout, v2.0<dbservere4> ESTABLISH SSH CONNECTION FOR USER: None<dbservere4> SSH: EXEC ssh -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/home/willert/.ansible/cp/ansible-ssh-%h-%p-%r -tt dbservere4 (umask 22 && mkdir -p "$(echo /tmp/.ansible/tmp/ansible-tmp-1447659206.06-120147812768677)" && echo "$(echo /tmp/.ansible/tmp/ansible-tmp-1447659206.06-120147812768677)")<dbservere4> PUT /tmp/tmprmOes7 TO /tmp/.ansible/tmp/ansible-tmp-1447659206.06-120147812768677/ping<dbservere4> SSH: EXEC sftp -b - -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/home/willert/.ansible/cp/ansible-ssh-%h-%p-%r [dbservere4]<dbservere4> ESTABLISH SSH CONNECTION FOR USER: None<dbservere4> SSH: EXEC ssh -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/home/willert/.ansible/cp/ansible-ssh-%h-%p-%r -tt dbservere4 LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 /usr/bin/python /tmp/.ansible/tmp/ansible-tmp-1447659206.06-120147812768677/ping; rm -rf "/tmp/.ansible/tmp/ansible-tmp-1447659206.06-120147812768677/" > /dev/null 2>&1dbservere4 | SUCCESS => { "changed": false, "invocation": { "module_args": {}, "module_name": "ping" }, "ping": "pong"}
[willert@localhost ~]$ ansible --versionansible 2.0.0 config file = /home/willert/.ansible.cfg configured module search path = None