Giter Club home page Giter Club logo

shelly_collection's Introduction

Ansible Collection - denismaggior8.shelly_collection

Prerequisites

  • ansible core 2.17.0
  • python 3.11.0

Collection installation and removal

To install this collection (latest version) from Ansible Galaxy:

$ ansible-galaxy collection install denismaggior8.shelly_collection

To install this collection from its GitHub repo (main branch):

$ git clone https://github.com/denismaggior8/shelly_collection
$ ansible-galaxy collection install shelly_collection

To uninstall this collection:

$ rm -rf ~/.ansible/collections/ansible_collections/denismaggior8/shelly_collection/

Use the dynamic inventory plugin

The shelly_inventory_plugin is used to populate a dynamic Ansible inventory getting data from Shelly Cloud. All devices, will be managed by Ansible on the local LAN.

Verify if the inventory plugin is installed:

$ ansible-doc -t inventory -l 2> /dev/null | grep shelly

An output like this, indicates that the collection (and the inventory plugin) is found on your system:

Found installed collection denismaggior8.shelly_collection:1.0.0 at '~/.ansible/collections/ansible_collections/denismaggior8/shelly_collection'
denismaggior8.shelly_collection.shelly_inventory_plugin Returns a dynamic h...

Create the plugin configuration file (make sure you substitute the placeholders marked with <> with actual values):

$ cat << 'EOF' > shelly_inventory_plugin.yaml
---
plugin: denismaggior8.shelly_collection.shelly_inventory_plugin
auth_key: <YOUR SHELLY CLOUD AUTHENTICATION KEY>
url_prefix: <YOUR SHELLY CLOUD REST API PREFIX (i.e. shelly-6-eu)>
EOF 

Test the inventory plugin:

$ ansible-inventory --inventory $PWD/shelly_inventory_plugin.yaml --list -v -v -v

An inventory JSON document containing all your Shelly devices (grouped by category, type, room_id, etc) should appear.

shelly_collection's People

Contributors

denismaggior8 avatar

Watchers

 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.