Giter Club home page Giter Club logo

ansible-stunnel's Introduction

stunnel

Role which helps to install and configure Stunnel.

The configuration of the role is done in such way that it should not be necessary to change the role for any kind of configuration. All can be done either by changing role parameters or by declaring completely new configuration as a variable. That makes this role absolutely universal. See the examples below for more details.

Please report any issues or send PR.

Example

---

- name: Example of how to configure Stunnel
  hosts: host1
  vars:
    # This is the configuration
    stunnel_config:
      smtps:
        accept: 5000
        client: "yes"
        connect: outbound.att.net:465
  roles:
    - stunnel

Role variables

List of variables used by the role:

# Package to be installed (explicit version can be specified here)
stunnel_pkg: stunnel

# Name of the Stunnel service
stunnel_service: stunnel

# Whether to install the service file
stunnel_service_install: yes

# Path of the init.d script
stunnel_service_upstart: /etc/init.d/{{ stunnel_service }}

# Path of the systemd script
stunnel_service_systemd: /usr/lib/systemd/system/{{ stunnel_service }}.service

# Data structure which helps to choose the right service script
stunnel_service_script:
  systemd:
    src: stunnel.systemd
    dest: "{{ stunnel_service_systemd }}"
  upstart:
    src: stunnel.upstart
    dest: "{{ stunnel_service_upstart }}"
    mode: "0755"

# Location of the Stunnel config file
stunnel_config_file: /etc/stunnel/stunnel.conf

# Stunnel configuration
stunnel_config: {}

Dependencies

License

MIT

Author

Jiri Tyr

ansible-stunnel's People

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ansible-stunnel's Issues

Error while running playbook

Following error is thrown when running playbook

FAILED! => {"failed": true, "msg": "The task includes an option with an undefined variable. The error was: 'dict object' has no attribute u'service'\n\nThe error appears to have been in '/jtyr.stunnel/tasks/main.yaml': line 30, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n  with_dict: \"{{ stunnel_service_script }}\"\n- name: Install Stunnel service script\n  ^ here\n\nexception type: <class 'ansible.errors.AnsibleUndefinedVariable'>\nexception: 'dict object' has no attribute u'service'"}

Fix is to replace the code with following code

- name: Install Stunnel service script
  copy:
    src: "{{ item.value.src}}"
    dest: "{{ item.value.dest}}"
    mode: "{{ item.value.mode | default('0644') }}"
  when: >
    stunnel_service_install
  with_dict: "{{ stunnel_service_script }}"
  tags:
    - stunnel_service

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.