One more point to verify :

Are you connected with admin user on the controller-server (where you play your playbook) ?

If not you should use remote_user to admin...

Perhaps a verbose log error could help.... use -vvvv when playing ansible-playbook

Regards,

JYL

Le 22/02/2019 à 14:28, visar a écrit :
Hello Experts,

I had a working playbook in my test environment, where my user was root user itslef and didnt have any issue. When i moved my playbook to staging environment , there my login user account is "admin" which is sudo user. But all of my playbooks are failing in this environment.

|
---

- name: Replace the silent-install-server_ file to each Application Servers
hosts: localhost,CCM,RM
vars:
jts_file: /etc/ansible/roles/IBM2/files/silent-install-server_JTS.xml
ccm_file: /etc/ansible/roles/IBM2/files/silent-install-server_CCM.xml
rm_file: /etc/ansible/roles/IBM2/files/silent-install-server_RM.xml
dest_dir: /opt/CLM-Web-Installer-Linux-6.0.5/im/linux.gtk.x86_64
tasks:
    - name: check the folder existance
stat: path=/opt/CLM-Web-Installer-Linux-6.0.5/im/linux.gtk.x86_64
register: folder_exist

    - name: JTS Server
copy:
  src: "{{ jts_file }}"
  dest: "{{ dest_dir }}/"
  mode: 777
  backup: yes
delegate_to: localhost
when: folder_exist.stat.exists == True

    - name: CCM Server
copy:
  src: "{{ ccm_file }}"
  dest: "{{ dest_dir }}/"
  mode: 777
  backup: yes
delegate_to: 10.170.3.12
when: folder_exist.stat.exists == True

    - name: RM Server
copy:
  src: "{{ rm_file }}"
  dest: "{{ dest_dir }}/"
  mode: 777
  backup: yes
delegate_to: 10.170.3.15
when: folder_exist.stat.exists == True

|

getting below error.

|
PLAY [Replace the silent-install-server_ file to each Application Servers] **********************************************************************************

TASK [Gathering Facts] **************************************************************************************************************************************
ok: [localhost]
fatal: [10.16.24.102]: FAILED! => {"msg": "Timeout (12s) waiting for privilege escalation prompt: "} fatal: [10.165.240.103]: FAILED! => {"msg": "Timeout (12s) waiting for privilege escalation prompt: "}

TASK [check the folder existance] ***************************************************************************************************************************
ok: [localhost]

TASK [JTS Server] *******************************************************************************************************************************************
ok: [localhost -> localhost]

TASK [CCM Server] ******************************************************************************************************************************************* fatal: [localhost]: FAILED! => {"msg": "Failed to get information on remote file (/opt/CLM-Web-Installer-Linux-6.0.5/im/linux.gtk.x86_64/silent-install-server_CCM.xml): Shared connection to 10.16.24.102 closed.\r\n"}   to retry, use: --limit @/etc/ansible/roles/IBM2/tasks/best/silentiInstallerfile.retry

PLAY RECAP **************************************************************************************************************************************************
10.16.24.102            : ok=0    changed=0    unreachable=0 failed=1
10.16.24.103            : ok=0    changed=0    unreachable=0 failed=1
localhost                 : ok=3    changed=0 unreachable=0    failed=1

|


my hostfile is as below

|
[IHS]
10.16.24.100
[JTS]
10.16.24.101
[CCM]
10.16.24.102
[RM]
10.16.24.103

|


--
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-project+unsubscr...@googlegroups.com <mailto:ansible-project+unsubscr...@googlegroups.com>. To post to this group, send email to ansible-project@googlegroups.com <mailto:ansible-project@googlegroups.com>. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/f94e51ee-2e4c-4663-b49d-8c831c629b7d%40googlegroups.com <https://groups.google.com/d/msgid/ansible-project/f94e51ee-2e4c-4663-b49d-8c831c629b7d%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.

--
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-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/79203b4f-ea12-1724-33f0-3c639cf2e996%40lenhof.eu.org.
For more options, visit https://groups.google.com/d/optout.

Reply via email to