Coder Social home page Coder Social logo

vasu4900 / ansible-mosquitto Goto Github PK

View Code? Open in Web Editor NEW

This project forked from stdevel/ansible-mosquitto

0.0 1.0 0.0 13 KB

Ansible role for installing and configuring the MQTT broker Eclipse mosquitto

Home Page: https://galaxy.ansible.com/stdevel/mosquitto

License: BSD 3-Clause "New" or "Revised" License

Python 100.00%

ansible-mosquitto's Introduction

Build Status

mosquitto

This role installs and configures the MQTT broker Eclipse mosquitto.

Requirements

This system requires an internet connection and a supported Linux distribution:

  • Enterprise Linux 7
    • Red Hat Enterprise Linux
    • CentOS
    • Scientific Linux
    • Oracle Linux
  • Debian
    • Buster
    • stretch

There is no EL8 support as there is currently no installable candidate for mosquitto.

Role Variables

Variable Default Description
configure_epel true  Configures the EPEL repository on EL7
configure_acl true Configures ACLs
allow_anonymous false Allows/forbids anonymous access
user_topics [{user: admin, password: 23cu53, global_readwrite: true}] Configures users and topics (see also ACLs)

ACLs

To configure ACLs, user_topics needs to be assigned to a list with at least one user object with the following settings:

Variable Description
password Password
global_read Global read access to all topics
global_write Global write access to all topics
global_readwrite Global read/write access to all topics
topics List of topics user has (un)limited access to

Please only specify one of global_read, global_write or global_readwrite.

To assign topics, assign a list to the topics element - the following settings are possible:

Variable Description
name Topic name
type Access type (read, write, readwrite)

Refer to the following example:

user_topics:
  - user: pinkepank
    password: trololo
    global_readwrite: true
  - user: giertz
    password: chad
    topics:
    global_read: true
  - user: bb8
    password: bleepbleep
    topics:
      - name: r2d2/target
        type: read
      - name: falcon/power
        type: write
      - name: luke/status
        type: readwrite
  • User pinkepank has global read/write access
  • User giertz has global read access
  • User bb8 has access to various topics
    • Read access to r2d2/target
    • Write access to falcon/power
    • Read/write access to luke/status

Dependencies

No dependencies.

Example Playbook

Refer to the following example:

    - hosts: servers
      roles:
         - stdevel.mosquitto

Set variables if required, e.g.:

---
- hosts: bee.giertz.loc
  remote_user: root
  roles:
    - role: stdevel.mosquitto
      user_topics:
        - user: pinkepank
          password: trololo
          global_readwrite: true

License

BSD

Author Information

Christian Stankowic ([email protected])

ansible-mosquitto's People

Contributors

stdevel avatar

Watchers

James Cloos avatar

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.