Role for installing, configuring and enabling a persistent ssh tunnel using autossh
Tested only on Centos7
$ ansible-galaxy install petalmd.autossh
- Supports local and remote port forwarding
- Creates the system daemon
---
- name: Redis Server
hosts: redis
roles:
- { role: autossh, autossh_daemon_name: autossh-redis-tunnel.service, autossh_daemon_description: redis-ssh-replication, autossh_server_ip: a.b.c.d, autossh_local_or_remote_switch: L, autossh_to_port: 6379, autossh_from_port: 6380}
- redis
Contributions, questions, and comments are all welcomed and encouraged!
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D