Giter Site home page Giter Site logo

tjanez / ansible-autossh-tunnel-client Goto Github PK

View Code? Open in Web Editor NEW

This project forked from oefenweb/ansible-autossh-tunnel-client

1.0 2.0 0.0 164 KB

Set up a persistent tunnel (using autossh) in Ubuntu systems (client side)

License: MIT License

ansible-autossh-tunnel-client's Introduction

autossh-tunnel-client

Build Status Ansible Galaxy

Set up a persistent tunnel (using autossh) in Ubuntu systems (client side).

Requirements

None

Variables

  • autossh_tunnel_client_autossh_debug: [default: 1]: If this variable is set, the logging level is set to LOG_DEBUG

  • autossh_tunnel_client_autossh_first_poll: [default: 30]: Specifies the time to wait before the first connection test

  • autossh_tunnel_client_autossh_gatetime: [default: 0]: Specifies how long ssh must be up before we consider it a successful connection. If it is set to 0, then not only is the gatetime behaviour turned off, but autossh also ignores the first run failure of ssh

  • autossh_tunnel_client_autossh_loglevel: [default: 7]: Specifies the log level, corresponding to the levels used by syslog

  • autossh_tunnel_client_autossh_pidfile: [default: /var/run/autossh/autossh-tunnel-client.pid]: Write pid to specified file

  • autossh_tunnel_client_autossh_poll: [default: 60]: Specifies the connection poll time in seconds

  • autossh_tunnel_client_key_map: [default: []]: SSH key declarations

  • autossh_tunnel_client_key_map.{n}.src: [required]: The local path of the file to copy, can be absolute or relative (e.g. ../../../files/autossh-tunnel-client/etc/autossh/id_rsa)

  • autossh_tunnel_client_key_map.{n}.dest: [optional, default src | basename]: The remote path of the file to copy, relative to /etc/autossh (e.g. id_rsa)

  • autossh_tunnel_client_key_map.{n}.owner: [optional, default root]: The name of the user that should own the file

  • autossh_tunnel_client_key_map.{n}.group: [optional, default owner, root]: The name of the group that should own the file

  • autossh_tunnel_client_key_map.{n}.mode: [optional, default 0600]: The mode of the file to copy

  • autossh_tunnel_client_host: [required] Remote host to connect to (e.g. example.com)

  • autossh_tunnel_client_port: [default: 22]: Remote port to connect to

  • autossh_tunnel_client_user: [default: autossh]: Remote user for connection

  • autossh_tunnel_client_identity: [default: id_rsa]: Remote user for connection

  • autossh_tunnel_client_ssh_options: [default: ['ServerAliveInterval 60', 'ServerAliveCountMax 3', 'BatchMode=yes', 'StrictHostKeyChecking=no']]: SSH options

  • autossh_tunnel_client_forward: [required]: Port forward to set up (e.g. '3307:127.0.0.1:3306')

Dependencies

None

Recommended

  • ansible-autossh-tunnel-server (see)

Example(s)

MySQL tunnel
---
- hosts: all
  roles:
    - autossh-tunnel-client
  vars:
    autossh_tunnel_client_key_map:
      - src: ../../../files/autossh-tunnel-client/etc/autossh/id_rsa
    autossh_tunnel_client_host: 'example.com'
    autossh_tunnel_client_forward: '3307:127.0.0.1:3306'

You will be able to connect to mysql using:

mysql -h 127.0.0.1 -P 3307 -u#### -p#### --skip-ssl;

License

MIT

Author Information

Mischa ter Smitten (based on work of netkernelroc)

Feedback, bug-reports, requests, ...

Are welcome!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.