Re: [ansible-project] dynamically set info in hosts file

2023-11-07 Thread Kathy L
Yes. I have my ansible code on the controller. First I set up the bastion host, then I want the variables from the bastion host file copied into the hosts file. Then I'll set up the target host. You're right. I can't believe I forgot that . Thank you! On Tuesday, November 7, 2023 at 11:45:

Re: [ansible-project] dynamically set info in hosts file

2023-11-07 Thread Kathy L
Yes. I have my ansible code on the controller. First I set up the bastion host, then I want the variables from the bastion host file copied into the hosts file. Then I'll set up the target host. On Tuesday, November 7, 2023 at 11:45:58 AM UTC-5 Brian Coca wrote: > You have 3 hosts involved, bu

Re: [ansible-project] dynamically set info in hosts file

2023-11-07 Thread Kathy L
I actually have 2 hosts I'm setting up. First I set up the bastion host, then the target host. So I need the info from the bastion host to be entered into the hosts file. On Tuesday, November 7, 2023 at 11:45:58 AM UTC-5 Brian Coca wrote: > You have 3 hosts involved, but you do not clarify whi

Re: [ansible-project] dynamically set info in hosts file

2023-11-07 Thread Brian Coca
You have 3 hosts involved, but you do not clarify which one you are updating: controller, bastion or target? I'm guessing you are using the play pointing at the target, but you probably need to delegate the task to the controller (aka localhost). -- -- Brian Coca -- You received this m

[ansible-project] dynamically set info in hosts file

2023-11-07 Thread Kathy L
I am trying to dynamically set my target host info, which I can only get to through a Bastion host. Here is what I am doing: - name: Set up host lineinfile: path: "{{ inventory_file }}" regexp: '^ansible_ssh_common_args=-o ProxyCommand="ssh -p BASTION_port -W %h:%p -q BASTION_user@BAS