Skip to content

Commit

Permalink
Add links to role READMEs in collection README
Browse files Browse the repository at this point in the history
Fixes #12
  • Loading branch information
jhampson-dbre authored and Jared Hampson committed Jan 18, 2021
1 parent b3cb546 commit 3a64cf7
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 5 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ A collection of roles for installing and configuring Home Assistant Supervised o

### Minimal installation

These roles attempt to implement the strict set of requirements for installing Home Assistant Supervised available [here](https://github.com/home-assistant/architecture/blob/6da4482d171f2ef04de9320d313526653b5818b4/adr/0014-home-assistant-supervised.md)
These roles attempt to implement the strict set of requirements for installing Home Assistant Supervised available [here](https://github.com/home-assistant/architecture/blob/6da4482d171f2ef04de9320d313526653b5818b4/adr/0014-home-assistant-supervised.md).
While every effort has been made to ensure these roles complies with ADR-0014, no guarantee can be made it does now, or in the future. These roles may have software package requirements (e.g. `python3-apt`) that are not specified by ADR-0014. To date these have not caused Home Assistant to report an unsupported installation, but please file a GitHub if you encounter any problems.

[preinstall_config](https://github.com/jhampson-dbre/home_assistant/blob/main/roles/preinstall_config/README.md) - Prerequisite configuration for Home Assistant Supervised installation
1. [preinstall_config](https://github.com/jhampson-dbre/home_assistant/blob/main/roles/preinstall_config/README.md) - Prerequisite configuration for Home Assistant Supervised installation

### Additional roles

These roles provide additional functionality to secure and enhance the minimal install of Home Assistant Supervised. These roles do not strictly comply with ADR-0014. However, in my own setup, Home Assistant reports the installation is supported. A future update to Home Assistant could change the way that supported installation is reported and detect an unsupported installation, but this is also true for the minimal installation if any of the requirements change.
These roles provide additional functionality to secure and enhance the minimal install of Home Assistant Supervised. These are roles I use myself and do not comply with ADR-0014.

[harden_os](https://github.com/jhampson-dbre/home_assistant/blob/main/roles/harden_os/README.md) - Enable automated Debian security updates and restrict SSH access
[fail2ban](https://github.com/jhampson-dbre/home_assistant/blob/main/roles/fail2ban/README.md) - Install fail2ban, configure it to blacklist IPs with excessive failed login attempts to Home Assistant, and add the fail2ban integration to Home Assistant
1. [harden_os](https://github.com/jhampson-dbre/home_assistant/blob/main/roles/harden_os/README.md) - Enable automated Debian security updates and restrict SSH access
1. [fail2ban](https://github.com/jhampson-dbre/home_assistant/blob/main/roles/fail2ban/README.md) - Install fail2ban, configure it to blacklist IPs with excessive failed login attempts to Home Assistant, and add the fail2ban integration to Home Assistant
23 changes: 23 additions & 0 deletions roles/preinstall_config/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,29 @@
delegate_to: localhost
run_once: true

- name: Check if SSH keypair already exists
stat:
path: "{{ lookup('env','HOME') + '/.ssh/id_rsa' }}"
register: existing_ssh_key
become: no
delegate_to: localhost
run_once: true

- name: Backup existing SSH keypair
copy:
src: "{{ key_file }}"
dest: "{{ key_file + '.bak' }}"
backup: yes
loop:
- "{{ lookup('env','HOME') + '/.ssh/id_rsa' }}"
- "{{ lookup('env','HOME') + '/.ssh/id_rsa.pub' }}"
loop_control:
loop_var: key_file
when: existing_ssh_key.stat.exists
become: no
delegate_to: localhost
run_once: true

- name: Create SSH key pair on the control machine to connect using home assistant user
openssh_keypair:
path: "{{ lookup('env','HOME') + '/.ssh/id_rsa' }}"
Expand Down

0 comments on commit 3a64cf7

Please sign in to comment.