Lalit
May 12, 2020, 10:13am
#1
@Inderpreet @mmumshad I have executed the task successfully but the final status is “Task failed”.
Please look into the issue.
Error:
ansible is not able to ping App Server 1
from Jump Host or something is incorrect in an inventory file on Jump Server
ansible playbook executed successfully.
How does your inventory looked like?
Lalit
May 12, 2020, 3:32pm
#3
[apps]
172.16.238.10 ansible_user=tony ansible_password=Ir0nM@n
172.16.238.11 ansible_user=steve ansible_password=Am3ric@
172.16.238.12 ansible_user=banner ansible_password=BigGr33n
Lalit
May 13, 2020, 5:03am
#4
@kodekloud-support3 @Inderpreet
Any update on this?
I’ve used below command to execute the playbook
ansible-playbook playbook.yml -i inventory -b
Lalit
May 16, 2020, 2:01am
#5
@kodekloud-support3
Please let me know if anyone still looking into it.
Lalit
May 17, 2020, 3:05pm
#6
@Inderpreet
I can see the status of both the tasks are marked as successful, but still bonus points are missing. Please look into it.
Lalit
May 18, 2020, 3:40pm
#7
@Inderpreet @kodekloud-support3 @mmumshad
Could you resolve the bonus points issue?
@mmumshad @Inderpreet @Ayman @kodekloud-support3 Even for me the same task is marked as failed, though my playbook is able to copy the ‘index.html’ file into all app servers.
Please do the needful.
Please find below the screenshots for ref:
@balu.networks7 marked successful for you.
1 Like
Salim
July 16, 2020, 6:45am
#10
Dear @Inderpreet , @Ayman @kodekloud-support3 , I have successfully completed this task but it has been marked failed with the message as @Lalit
Please check.
Running playbook.yml
The index.html file was created an all application servers in /opt/sysops
Thanks.
Cheers,
Salim
1 Like
Salim
July 18, 2020, 5:04am
#11
Hi @Salim Sorry for inconvenience, this is marked Success
for you.
2 Likes
Salim
July 18, 2020, 6:57pm
#13
Thank you @Inderpreet . I appriciate the support.
Hi All
Even for me all task marked failed even files created.
thor@jump_host ~/ansible$ ansible all -i inventory -m command -a “ls -l /opt/security/index.html”
stapp02 | CHANGED | rc=0 >>
-rw-r–r-- 1 root root 35 Aug 3 12:24 /opt/security/index.html
stapp03 | CHANGED | rc=0 >>
-rw-r–r-- 1 root root 35 Aug 3 12:24 /opt/security/index.html
stapp01 | CHANGED | rc=0 >>
-rw-r–r-- 1 root root 35 Aug 3 12:24 /opt/security/index.html
hor@jump_host ~/ansible$ cat inventory
stapp01 ansible_host=172.16.238.10 ansible_ssh_user=tony ansible_ssh_pass=Ir0nM@n
stapp02 ansible_host=172.16.238.11 ansible_ssh_user=steve ansible_ssh_pass=Am3ric@
stapp03 ansible_host=172.16.238.12 ansible_ssh_user=banner ansible_ssh_pass=BigGr33n
Can anyone plz check on it
Can some one plz check my task.
Task completed but still status failed
Hello, nithyaks
At least provide a time. They will check and give you positive response.
Will you explain what’s your task? May be our KKE community members will help.
Ansible Copy Module:
There is data on jump host that needs to be copied on all application servers in Stratos DC. Nautilus DevOps team want to perform this task using Ansible only. Perform this task using Ansible as per details mentioned below:
a. On jump host create an inventory file /home/thor/ansible/inventory and add all application servers as managed nodes.
b. On jump host create a playbook /home/thor/ansible/playbook.yml to copy /usr/src/security/index.html file to all application servers at location /opt/security.
Note: Validation will try to run playbook using command ansible-playbook -i inventory playbook.yml so please make sure playbook works this way, without passing any extra arguments.
Kindly update on my Ansible copy module task issue.