Created
March 14, 2019 21:05
-
-
Save rhrn/b6d025ab766915f7349ee41e7946aa02 to your computer and use it in GitHub Desktop.
Jumphost / Bastion : ssh, ansible examples
This file contains hidden or 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
# ansible hosts | |
all: | |
children: | |
project-servers: | |
hosts: | |
ingress: | |
ansible_user: ubuntu | |
ansible_host: 192.168.9.12 # replace by internal ip | |
app: | |
ansible_user: ubuntu | |
ansible_host: 192.168.20.92 # replace by internal ip | |
storage: | |
ansible_user: ubuntu | |
ansible_host: 192.168.18.165 # replace by internal ip | |
vars: | |
ansible_ssh_common_args: '-o StrictHostKeyChecking=no -o ProxyCommand="ssh -W %h:%p -q [email protected]"' # replace by user and ip |
This file contains hidden or 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
# peeped https://blog.keyboardinterrupt.com/ansible-jumphost/ | |
Host project-servers-* | |
StrictHostKeyChecking no | |
User ubuntu | |
ProxyCommand ssh -W %h:%p -q [email protected] # replace by user and ip | |
Host project-servers-ingress | |
HostName 192.168.9.12 # replace by internal ip | |
Host project-servers-app | |
HostName 192.168.20.92 # replace by internal ip | |
Host project-servers-storage | |
HostName 192.168.18.165 # replace by internal ip |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment