-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from Skorfulose/develop
First version
- Loading branch information
Showing
16 changed files
with
804 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
*.retry | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,45 @@ | ||
# ansible-raspberrypi-playbooks | ||
Ansible playbooks for my Raspberry Pis | ||
# Ansible Playbooks for my Raspberry Pis | ||
|
||
* Install requirements from Ansible Galaxy: | ||
`sudo ansible-galaxy install -r requirements.yml` | ||
* Check/set your preferred username in `vars/main.yml` | ||
* First run only: Run base playbook as default user `pi`: | ||
`ansible-playbook base.yml -i hosts -u pi --ask-pass` | ||
* Subsequent runs: | ||
`ansible-playbook main.yml -i hosts` | ||
* Or run specific playbooks only: | ||
`ansible-playbook ozwcp.yml -i hosts` | ||
|
||
## Playbooks | ||
|
||
### Base (base.yml) | ||
|
||
* Runs a full apt package upgrade/update | ||
* Extends the root filesystem to the actual SD Card size | ||
* Configures time zone, locale | ||
|
||
### OZWCP (ozwcp.yml) | ||
|
||
* Installs [OpenZWave Control Panel](https://github.com/OpenZWave/open-zwave-control-panel) | ||
|
||
### Mosquitto (mosquitto.yml) | ||
|
||
* Installs the [Mosquitto](http://mosquitto.org) MQTT broker | ||
|
||
### Home Assistant (home-assistant.yml) | ||
|
||
* Installs [Home Assistant](https://home-assistant.io/) | ||
* Installs [OpenZWave](http://www.openzwave.net) | ||
* Clones [my config from GitHub](https://github.com/Skorfulose/home-assistant-config) | ||
|
||
### Hyperion (hyperion.yml) | ||
|
||
* Installs [Hyperion](https://hyperion-project.org) | ||
* Applies my configuration | ||
|
||
### Misc (misc.yml) | ||
|
||
This playbook performs some basic configurations I prefer to have available on my Linux machines. | ||
|
||
* Create an `ll` alias for `ls -alF` | ||
* Install `htop` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
- hosts: raspberrypi* | ||
become: true | ||
roles: | ||
- role: mikolak.raspi-config | ||
raspi_config_update_packages: yes | ||
raspi_config_expanded_filesystem: yes | ||
raspi_config_ensure_optimal_cpu_params: false | ||
raspi_config_locale: de_DE.UTF8 | ||
raspi_config_timezone: Europe/Berlin | ||
raspi_config_fail_on_auth_test: false | ||
raspi_config_replace_user: | ||
name: "{{ main_user }}" | ||
path_to_ssh_key: "~/.ssh/id_rsa.pub" | ||
vars_files: | ||
- vars/main.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
- hosts: raspberrypi | ||
roles: | ||
- role: mechaxl.homeassistant | ||
enable_zwave: yes | ||
hass_configuration: | | ||
homeassistant: | ||
name: Home | ||
- role: home-assistant-config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[raspberrypi] | ||
pi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
- hosts: raspberrypi | ||
roles: | ||
- hyperion |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
- include: misc.yml | ||
- include: home-assistant.yml | ||
- include: ozwcp.yml | ||
- include: mosquitto.yml | ||
- include: hyperion.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
- hosts: all | ||
roles: | ||
- misc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
- hosts: raspberrypi | ||
roles: | ||
- pbonrad.mosquitto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
- hosts: raspberrypi | ||
roles: | ||
- role: mechaxl.ozwcp | ||
ozwcp_user: ozwcp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
- src: mikolak.raspi-config | ||
- src: pbonrad.mosquitto | ||
- src: mechaxl.homeassistant | ||
- src: mechaxl.ozwcp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
- name: delete existing config folder (git clone will fail in a non-empty dir) | ||
file: | ||
path: /home/hass/.homeassistant | ||
state: absent | ||
become: true | ||
- name: clone my config from GitHub | ||
git: | ||
repo: https://github.com/Skorfulose/home-assistant-config.git | ||
dest: /home/hass/.homeassistant | ||
become: true | ||
become_user: hass | ||
- name: restart home assistant to apply config | ||
service: | ||
name: home-assistant | ||
state: restarted | ||
become: true |
Oops, something went wrong.