FAILED! => {"changed": false, "cmd": "/usr/java/ -c 'which java'", "msg": "[Errno 13] Permission denied", "rc": 13}
this is what I execute..
ansible-playbook -i hosts java.yml -vv --ask-become-pass
I will have to login first using "myremoteuser" and then I have to change the user to "serveruser" and execute the above command.
I am able to do this directly on server but not through ansible.
Kindly help.
Thanks in advance,
Ruben
{"changed": true, "cmd": "which java", "delta": "0:00:00.074712", "end": "2019-01-23 13:41:10.748039", "msg": "non-zero return code", "rc": 1, "start": "2019-01-23 13:41:10.673327", "stderr": "which: no java in (/usr/bin:/bin:/usr/sbin:/sbin)", "stderr_lines": ["which: no java in (/usr/bin:/bin:/usr/sbin:/sbin)"], "stdout": "", "stdout_lines": []}
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/527b1756-839f-4b6d-9660-ee6745f7aa71%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
fatal: [ma-idmspp-lapp565]: FAILED! => {"changed": true, "cmd": "find -L /usr -executable -type f -name \"java\" -print", "delta": "0:00:01.458827", "end": "2019-01-23 15:10:26.161587", "msg": "non-zero return code", "rc": 1, "start": "2019-01-23 15:10:24.702760", "stderr": "find: '/usr/share/polkit-1/rules.d': Permission denied\nfind: '/usr/libexec/initscripts/legacy-actions/auditd': Permission denied\nfind: '/usr/tmp/lost+found': Permission denied\nfind: '/usr/tmp/.ansible-c5023304': Permission denied\nfind: '/usr/tmp/yum-root-a6LSso': Permission denied\nfind: '/usr/tmp/systemd-private-8e020ca4b1d1423ea4e25c65b1f20330-ntpd.service-7jH9UJ': Permission denied\nfind: '/usr/local/gcs_compliance': Permission denied\nfind: '/usr/local/epic/cache': Permission denied\nfind: '/usr/local/epic/log': Permission denied\nfind: '/usr/local/lib/asset': Permission denied", "stderr_lines": ["find: '/usr/share/polkit-1/rules.d': Permission denied", "find: '/usr/libexec/initscripts/legacy-actions/auditd': Permission denied", "find: '/usr/tmp/lost+found': Permission denied", "find: '/usr/tmp/.ansible-c5023304': Permission denied", "find: '/usr/tmp/yum-root-a6LSso': Permission denied", "find: '/usr/tmp/systemd-private-8e020ca4b1d1423ea4e25c65b1f20330-ntpd.service-7jH9UJ': Permission denied", "find: '/usr/local/gcs_compliance': Permission denied", "find: '/usr/local/epic/cache': Permission denied", "find: '/usr/local/epic/log': Permission denied", "find: '/usr/local/lib/asset': Permission denied"], "stdout": "/usr/java/jdk64-1.8.0_151/bin/java\n/usr/java/jdk64-1.8.0_151/jre/bin/java\n/usr/java/jre64-1.8.0_111/bin/java\n/usr/java/jre64-1.8.0_111/jre/bin/java", "stdout_lines": ["/usr/java/jdk64-1.8.0_151/bin/java", "/usr/java/jdk64-1.8.0_151/jre/bin/java", "/usr/java/jre64-1.8.0_111/bin/java", "/usr/java/jre64-1.8.0_111/jre/bin/java"]}
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/8a6d42f6-e568-499c-a27c-e56cfb1f5a58%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
FAILED! => {"changed": true, "cmd": "java -version", "delta": "0:00:00.074380", "end": "2019-01-28 06:00:14.656299", "msg": "non-zero return code", "rc": 127, "start": "2019-01-28 06:00:14.581919", "stderr": "/bin/bash: java: command not found", "stderr_lines": ["/bin/bash: java: command not found"], "stdout": "", "stdout_lines": []}
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/49dd72ca-39cc-4b49-afc7-8175ae380dc9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.