-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e53db59
commit 3240798
Showing
15 changed files
with
104 additions
and
3 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
4 changes: 4 additions & 0 deletions
4
config/ansible/inventory/host_vars/hl01.edge.lab.ferrari.how/main.yaml
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 @@ | ||
--- | ||
ansible_user: debian | ||
has_coral_pci_accelerator: true | ||
... |
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
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
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,10 @@ | ||
--- | ||
- name: Import the bootstrap playbook | ||
ansible.builtin.import_playbook: bootstrap.yaml | ||
|
||
- name: Configure Coral devices | ||
hosts: all | ||
gather_facts: true | ||
roles: | ||
- role: ferrarimarco_home_lab_coral | ||
... |
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
3 changes: 3 additions & 0 deletions
3
config/ansible/roles/ferrarimarco_home_lab_coral/defaults/main.yaml
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 @@ | ||
--- | ||
has_coral_pci_accelerator: false | ||
... |
7 changes: 7 additions & 0 deletions
7
config/ansible/roles/ferrarimarco_home_lab_coral/handlers/main.yaml
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,7 @@ | ||
--- | ||
- name: Reboot the host | ||
ansible.builtin.reboot: null | ||
when: | ||
# Skip rebooting the host when running a Molecule test because we can't reboot a container | ||
- molecule_yml is not defined | ||
... |
12 changes: 12 additions & 0 deletions
12
config/ansible/roles/ferrarimarco_home_lab_coral/meta/main.yaml
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,12 @@ | ||
--- | ||
galaxy_info: | ||
author: https://github.com/ferrarimarco | ||
description: | | ||
Role to configure Coral Edge TPUs. | ||
license: MIT | ||
min_ansible_version: "2.13" | ||
platforms: | ||
- name: Debian | ||
versions: | ||
- all | ||
... |
7 changes: 7 additions & 0 deletions
7
config/ansible/roles/ferrarimarco_home_lab_coral/tasks/main.yaml
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,7 @@ | ||
--- | ||
- name: Setup Proxmox OS packages and repositories | ||
ansible.builtin.include_tasks: | ||
file: setup-coral-os-packages.yaml | ||
when: | ||
- has_coral_pci_accelerator | ||
... |
30 changes: 30 additions & 0 deletions
30
config/ansible/roles/ferrarimarco_home_lab_coral/tasks/setup-coral-os-packages.yaml
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,30 @@ | ||
--- | ||
- name: Enable the Coral APT repository | ||
ansible.builtin.deb822_repository: | ||
name: "{{ item.name }}" | ||
uris: "{{ item.uris }}" | ||
suites: "{{ item.suites }}" | ||
components: "{{ item.components }}" | ||
signed_by: "{{ item.key }}" | ||
types: deb | ||
become: true | ||
with_items: | ||
- name: coral-edgetpu-stable | ||
components: main | ||
key: https://packages.cloud.google.com/apt/doc/apt-key.gpg | ||
suites: coral-edgetpu-stable | ||
uris: https://packages.cloud.google.com/apt | ||
|
||
- name: Install Coral packages | ||
# Don't set cache_valid_time because we want to force a cache update after we | ||
# added the Coral APT repository | ||
ansible.builtin.apt: | ||
name: | ||
- gasket-dkms | ||
- libedgetpu1-std | ||
state: present | ||
update_cache: true | ||
become: true | ||
notify: | ||
- Reboot the host | ||
... |
2 changes: 2 additions & 0 deletions
2
config/ansible/roles/ferrarimarco_home_lab_coral/vars/main.yaml
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 @@ | ||
--- | ||
... |
2 changes: 1 addition & 1 deletion
2
config/ansible/roles/ferrarimarco_home_lab_node/vars/raspberry-pi-os.yaml
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
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
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