Skip to main content

Question Questions about Ansible connection to remote hosts

remove noise
Source Link
Pierre.Vriens
  • 7.2k
  • 14
  • 37
  • 84

I want to ask some questions about working of Ansible.

1 - Which shell Ansible uses when logging to remote host ?

https://askubuntu.com/questions/937354/track-logins-made-via-non-interactive-shells/937716?noredirect=1#comment1486867_937716

2 - If I have 10 tasks in a playbook, then ansible makes connection 10 times to remote host OR uses a single connection to perform all these 10 tasks ?

3 - If I am running 10 tasks on 2 hosts,

It will do first task on host 1 and then on host 2 then second task on host 1 and then on host 2, .. . so on,

.

So, here also the connection persists to both the hosts?

OR

does it firstly connect to host 1, runs task 1 and then disconnects AND then connects to host 2, runs task 1 and then disconnects ?

I am sorry If I am asking annoying questions.

I want to ask some questions about working of Ansible.

1 - Which shell Ansible uses when logging to remote host ?

https://askubuntu.com/questions/937354/track-logins-made-via-non-interactive-shells/937716?noredirect=1#comment1486867_937716

2 - If I have 10 tasks in a playbook, then ansible makes connection 10 times to remote host OR uses a single connection to perform all these 10 tasks ?

3 - If I am running 10 tasks on 2 hosts,

It will do first task on host 1 and then on host 2 then second task on host 1 and then on host 2, .. . so on,

.

So, here also the connection persists to both the hosts?

OR

does it firstly connect to host 1, runs task 1 and then disconnects AND then connects to host 2, runs task 1 and then disconnects ?

I am sorry If I am asking annoying questions.

I want to ask some questions about working of Ansible.

1 - Which shell Ansible uses when logging to remote host ?

https://askubuntu.com/questions/937354/track-logins-made-via-non-interactive-shells/937716?noredirect=1#comment1486867_937716

2 - If I have 10 tasks in a playbook, then ansible makes connection 10 times to remote host OR uses a single connection to perform all these 10 tasks ?

3 - If I am running 10 tasks on 2 hosts,

It will do first task on host 1 and then on host 2 then second task on host 1 and then on host 2, .. . so on,

.

So, here also the connection persists to both the hosts?

OR

does it firstly connect to host 1, runs task 1 and then disconnects AND then connects to host 2, runs task 1 and then disconnects ?

Source Link
luv.preet
  • 223
  • 1
  • 7

Question about Ansible connection

I want to ask some questions about working of Ansible.

1 - Which shell Ansible uses when logging to remote host ?

https://askubuntu.com/questions/937354/track-logins-made-via-non-interactive-shells/937716?noredirect=1#comment1486867_937716

2 - If I have 10 tasks in a playbook, then ansible makes connection 10 times to remote host OR uses a single connection to perform all these 10 tasks ?

3 - If I am running 10 tasks on 2 hosts,

It will do first task on host 1 and then on host 2 then second task on host 1 and then on host 2, .. . so on,

.

So, here also the connection persists to both the hosts?

OR

does it firstly connect to host 1, runs task 1 and then disconnects AND then connects to host 2, runs task 1 and then disconnects ?

I am sorry If I am asking annoying questions.