https://github.com/chusiang/ssh-bastion.ansible
A Ansible LAB with SSH bastion host.
https://github.com/chusiang/ssh-bastion.ansible
ansible ansible-playbook bastion-host lab ssh
Last synced: 8 months ago
JSON representation
A Ansible LAB with SSH bastion host.
- Host: GitHub
- URL: https://github.com/chusiang/ssh-bastion.ansible
- Owner: chusiang
- License: mit
- Created: 2020-03-28T12:58:40.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-03-30T15:54:09.000Z (over 6 years ago)
- Last Synced: 2024-12-27T20:49:40.219Z (over 1 year ago)
- Topics: ansible, ansible-playbook, bastion-host, lab, ssh
- Language: Makefile
- Homepage:
- Size: 26.4 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Ansible Playbooks: SSH Bastion LAB
=========
A Ansible LAB with SSH bastion host (jump).
| Name | Public IP | Private IP |
|---------|-----------|------------|
| jump | DHCP | 172.1.1.10 |
| server1 | Null | 172.1.1.11 |
SSH:
* Workstion --> jump: OK
* Workstion --> jump --> server1: OK
* Workstion --> server1: No.
Normal ping (not via Ansible):
* Workstion --> jump / Public IP: OK.
* Workstion --> jump / Private IP: No.
* Workstion --> server1 / Private IP: No.
Requirements
------------
1. Vagrant
1. Make
Variables
--------------
```
$ cat group_vars/all.yml
---
# vars file for ssh-bastion.ansible
ssh_remote_user: vagrant
ssh_bastion_private_key: ".vagrant/machines/jump/virtualbox/private_key"
ssh_server1_private_key: ".vagrant/machines/server1/virtualbox/private_key"
ssh_control_persist: 5m
ssh_strict_host_key_checking: "no"
```
Dependencies
------------
None.
Usage
-----
1. Boot the bastion and managed node.
```
# $ vagrant up
$ make up
```
1. Run `setup_control_machine.yml` playbook at local.
```
# $ ansible-playbook setup_control_machine.yml
$ make init
```
1. Run `ping_all.yml` playbook.
```
# $ ansible-playbook ping_all.yml
$ make ping
```
License
-------
MIT
Author Information
------------------
1. [chusiang (Chu-Siang Lai)](https://note.drx.tw)