copy file to host not in inventory

32 views
Skip to first unread message

william...@gmail.com

unread,
Sep 1, 2020, 11:55:43 AM9/1/20
to Ansible Project
Hi, sorry, I can't quite get my head around the last bit of my playbook.

I have a playbook that is doing ssh key rotations - it is pretty much all working other than once it has generated the keys and used authorized_keys module to put them on the hosts in the inventory, I want to copy the keys back to my workstation.  Then it deletes the keys to cleanup.  I use delegate_to and run_once when creating the keys, but how do I copy the keys to my workstation which is not in my inventory - I am using dynamic inventories in AWX... this isn't something I have run into before, I will have to use a command worst case I guess, but welcome any alternative suggestions.

thanks
Bill

William Dossett

unread,
Sep 1, 2020, 3:13:31 PM9/1/20
to ansible...@googlegroups.com

In the end I just used command: scp   seems to work adequately

 

Regards

Bill

--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/eb6c28eb-114b-445b-bd74-9359d1e78673n%40googlegroups.com.

Mike Eggleston

unread,
Sep 1, 2020, 3:20:55 PM9/1/20
to ansible...@googlegroups.com
Could use ansible-playbook -i 

Mike

On Sep 1, 2020, at 14:13, William Dossett <william...@gmail.com> wrote:



Ankit Vashistha

unread,
Sep 2, 2020, 10:29:50 AM9/2/20
to Ansible Project
I am not sure if i clearly understood your question but, you might look into this:

Regards,
Ankit


Reply all
Reply to author
Forward
0 new messages