Re: [ansible-project] How to wait for uptime of 2 minutes and then execute next task

2023-04-02 Thread Deepanjan Acharya
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

Re: [ansible-project] Need to automate task via bastion host

2023-04-02 Thread dulhaver via Ansible Project
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

Re: [ansible-project] Need to automate task via bastion host

2023-04-02 Thread Todd Zullinger
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

Re: [ansible-project] Need to automate task via bastion host

2023-04-02 Thread Monica
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

Re: [ansible-project] Need to automate task via bastion host

2023-04-02 Thread Todd Zullinger
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.

Re: [ansible-project] Need to automate task via bastion host

2023-04-02 Thread Will McDonald
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

[ansible-project] Re: how to execute playbook task on Host-B directly from control machine

2023-04-02 Thread Monica
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

[ansible-project] Need to automate task via bastion host

2023-04-02 Thread Monica
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