You could use a sleep task between this two tasks and assign 120sec sleep
time.
Example: using builtin wait module
- name: Sleep for 300 seconds and continue with play
ansible.builtin.wait_for:timeout: 300 delegate_to: localhost
Other wise you can use shell module and use command “sleep
I agree with Tood, that setting up a propper ~/.ssh/config should be the way to
do this. something like ...
Host jumphost
HostName jumphost.blub.com
User username
PreferredAuthentication publickey
IdentityFile ~/.ssh/demo.ed25519
Host internal-target
Hi,
Monica wrote:
> Thank you for sharing the same, however, I have already
> checked this article.
I was simply quoting the article which Will kindly shared to
mention that ProxyJump / -J might be a simpler method, even
within ansible_ssh_common_args.
[I reformatted some of the text you wrote
Hi Todd,
Thank you for sharing the same, however, I have already checked this
article.
I have a requirement to connect Host-A then I can connect Host-B. I can’t
connect Host-B directly. So in this case how to execute the playbook task
on Host-B from Control Machine? Because my control
Will McDonald wrote:
> https://www.jeffgeerling.com/blog/2022/
> using-ansible-playbook-ssh-bastion-jump-host
Odd that uses ProxyCommand in `ansible_ssh_common_args` and
not the far simpler ProxyJump, which it does mention in the
~/.ssh/config method. The `-J` shortcut for that is even
better.
https://www.jeffgeerling.com/blog/2022/using-ansible-playbook-ssh-bastion-jump-host
On Sun, 2 Apr 2023 at 16:35, Monica wrote:
> Hi All,
>
> I have requirement to automate some tasks via ansible playbook, the
> problem is I cannot go to the serves directly I need to go to remote nodes
> via
Hi Dip Giri,
Did you get the answer of above query I am also facing the same issue.
On Saturday, March 12, 2022 at 11:47:59 PM UTC+5:30 Dip Giri wrote:
> First i have to connect *Host-A* then i can connect *Host-B*. i can’t
> connect Host-B directly. So in this case how to execute playbook
Hi All,
I have requirement to automate some tasks via ansible playbook, the problem
is I cannot go to the serves directly I need to go to remote nodes via
bastion node. Could anyone pls help how can I write the same inside
inventory. Below is the example how I am connecting to the remote host