Code Monkey home page Code Monkey logo

home-assistant-ansible's Introduction

License: Apache

Home Assistant

This role deploys Home Assistant to a remote system.

Requirements

One requirement is to have a system with a configured instance of Ansible. This means that you have an inventory and access to the remote system via SSH with keys.

  1. Add the remote system to your Ansible's hosts (/etc/ansible/hosts) file to the group [home-assistant].
  2. For every system you want to manage, you need to have the master's SSH key in the authorized_keys file of the managed/remote system.

From the management system for the user root:

$ sudo ssh-copy-id -i /home/[your local user]/.ssh/id_rsa.pub root@[IP address of remote system]

While checking if you are able to login the remote system without password, you should check if Python and the DNF Python binding are available. If not, install them to save some time later.

$ sudo dnf -y install python python-dnf
  1. Perform a first check if Ansible works. You need to use the user root:
$ ansible home-assistant -m ping -u root -b
192.168.1.2 | success >> {
    "changed": false,
    "ping": "pong"
}

For further details about the setup of Ansible, check their documentation.

Role Variables

  • ha_venv: The location of the virtual environment. Defaults to /opt/home-assistant
  • ha_user: The user for Home Assistant. Defaults to ha.
  • ha_port: The default port which is 8123. If you change that, you will need to modify the configuration.yml file of Home Assistant.
  • pkgs: List of packages to install on the remote system.

Dependencies

There are no dependencies for this role.

Example Playbook

Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:

- hosts: home-assistant
  roles:
     - home-assistant.home-assistant-ansible

Warning

Think first before you implement stuff from this repository. Consider the playbooks in this repository as non-generic. They were made especially for the deployment of Home Assistant and Fedora at the moment.

License

Apache 2.0

Author Information

Fabian Affolter. If you are too young to know what e-mail is, use @fabaff ;-).

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.