Trying to execute bash script using Ansible one one node

0 votes

I have a bash script that I need to execute one of my nodes using ansible

- name : execute the script for uploading www files
  shell: /root/upload_www.sh

I end up with this error:

ssh -t -o StrictHostKeyChecking=no -i $key user@$kavya "sudo rsync -kavya \"ssh -o StrictHostKeyChecking=no -i $key\" /var/www/html user@$source:/var/www/"
Jan 29, 2019 in Ansible by Omkar
2,277 views

1 answer to this question.

0 votes

You could make your task an asynchronous action by adding the async: "{{ max_wait_time }}"option:

- name : execute the script for uploading www files
  shell: /root/upload_www.sh
  async: 10800 
  poll: 300 
answered Jan 29, 2019 by Kavya

Related Questions In Ansible

0 votes
1 answer
0 votes
1 answer

Ansible playbbok to copy files from one node to another remote node

You can create a playbook for copying ...READ MORE

answered Jan 16, 2019 in Ansible by Danica
4,174 views
0 votes
1 answer

Ansible playbook for moving files from one node to another remote node

The best way to do this is: copy ...READ MORE

answered Jan 16, 2019 in Ansible by Nigya

edited Jan 18, 2019 by Vardhan 9,548 views
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
4,041 views
+2 votes
1 answer
0 votes
1 answer

Execute a command using ansible playbook

Hey @Reshma, You can use the URI ...READ MORE

answered Jan 17, 2019 in Ansible by Sameer
5,455 views
0 votes
1 answer

Is it possible to run an Ansible Playbook in python script?

Hey @Cerci, Of course its possible. You ...READ MORE

answered Jan 17, 2019 in Ansible by Nicolas
15,673 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP