ansible 2.6.17 и pbrun su - пользователь

Я тестирую ansible с помощью pbrun. Мы подключаемся к серверу по ssh, используя наши собственные учетные данные, а затем после ssh запускаем pbrun su - orasoa, чтобы иметь возможность устанавливать двоичные файлы и домены Oracle.

Я тестирую 2 из своих ящиков для разработчиков

inventory
[soa]
soaserver1.mycompany.com
soaserver2.mycompany.com

доступный 2.6.17

мой ansible.cfg

inventory = inventory
remote_user      = oracl
ask_pass      = True
host_key_checking = false

[privilege_escalation]
become=True
become_method=pbrun
become_user=orasoa
become_ask_pass=True

Журналы Ansible

<soaserver1.mycompany.com.hphc.org> ESTABLISH SSH CONNECTION FOR USER: 
mmonter2
<soaserver1.mycompany.com.hphc.org> SSH: EXEC sshpass -d14 ssh -vvv -C -o 
ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 
User=mmonter2 -o ConnectTimeout=10 -o 
ControlPath=/home/orasoa/.ansible/cp/ae14ca51a1 -tt 
soaserver1.mycompany.com.hphc.org '/bin/sh -c '"'"'pbrun  -u orasoa 
 '"'"'"'"'"'"'"'"'echo BECOME-SUCCESS-zarafuemqzepjtglwquygnwehlgwpkso; 
/usr/bin/python /var/tmp/ansible-tmp-1571850508.16- 
236952200511820/ping.py'"'"'"'"'"'"'"'"' && sleep 0'"'"''
<soaserver1.mycompany.com.hphc.org> (0, '', 'OpenSSH_5.3p1, OpenSSL 
1.0.1e-fips 11 Feb 2013\ndebug1: Reading configuration data 
/etc/ssh/ssh_config\r\ndebug1: Applying options for *\r\ndebug1: 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_request_forwards: requesting 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 = 27594\r\ndebug3: mux_client_request_session: session request 
sent\r\ndebug1: mux_client_request_session: master session id: 
2\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')
fatal: [soaserver1.mycompany.com.hphc.org]: FAILED! => changed=false
  module_stderr: |-
OpenSSH_5.3p1, OpenSSL 1.0.1e-fips 11 Feb 2013
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: auto-mux: Trying existing master
debug2: fd 3 setting O_NONBLOCK
debug2: mux_client_hello_exchange: master version 4
debug3: mux_client_request_forwards: requesting forwardings: 0 local, 0 
 remote
debug3: mux_client_request_session: entering
debug3: mux_client_request_alive: entering
debug3: mux_client_request_alive: done pid = 27594
debug3: mux_client_request_session: session request sent
debug1: mux_client_request_session: master session id: 2
debug1: mux_client_request_session: master session id: 2
debug3: mux_client_read_packet: read header failed: Broken pipe
debug2: Received exit status from master 127
Shared connection to soaserver1.mycompany.com.hphc.org closed.
 module_stdout: |-
pbrun9.2.0-08[26134]: Request rejected by pbmasterd on lnlog004.hphc.org.
msg: MODULE FAILURE
 rc: 127

1 ответ

Вы пробовали эту опцию в ansible.cfg {uncomment ssh_args}

[ssh_connection]

# ssh arguments to use
# Leaving off ControlPersist will result in poor performance, so use
# paramiko on older platforms rather than removing it, -C controls compression use
ssh_args = -C -o ControlMaster=auto -o ControlPersist=30m
Другие вопросы по тегам