Created
December 8, 2022 21:10
-
-
Save powellnathanj/145d3517df7de6c623e839eb4df6f62b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- name: Get SSH keys | |
hosts: all | |
gather_facts: no | |
connection: local | |
tasks: | |
- name: "ssh and accept key with expect" | |
ansible.builtin.expect: | |
command: ssh {{inventory_hostname}} 'uptime' | |
responses: | |
(.*)\?: "Yes" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment