-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(provisioner): Setup playbook (#666)
* feat(provisioner): Setup playbook * Working playbook with Tailscale host * Add linter for Ansible * Disable announce for Trunk CLI
- Loading branch information
Showing
11 changed files
with
63 additions
and
14 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 |
---|---|---|
|
@@ -21,6 +21,7 @@ runtimes: | |
# This is the section where you manage your linters. (https://docs.trunk.io/check/configuration) | ||
lint: | ||
enabled: | ||
- [email protected] | ||
- [email protected] | ||
- [email protected] | ||
- [email protected] | ||
|
@@ -38,17 +39,18 @@ lint: | |
- [email protected] | ||
- [email protected] | ||
- [email protected] | ||
- [email protected] | ||
- [email protected] | ||
disabled: | ||
# Disabled explicitly because I think these break the integration with Trunk and VSCode | ||
- hadolint | ||
- trufflehog | ||
actions: | ||
enabled: | ||
- trunk-announce | ||
- trunk-check-pre-push | ||
- trunk-fmt-pre-commit | ||
- trunk-upgrade-available | ||
disabled: | ||
- trunk-announce | ||
tools: | ||
disabled: | ||
- poetry | ||
|
@@ -64,6 +66,7 @@ tools: | |
- [email protected] | ||
- [email protected] | ||
- [email protected] | ||
- [email protected] | ||
definitions: | ||
- name: bazelisk | ||
download: bazelisk | ||
|
@@ -100,6 +103,11 @@ tools: | |
shims: | ||
- name: devspace | ||
target: devspace | ||
- name: ansible | ||
runtime: python | ||
package: ansible | ||
shims: [ansible, ansible-playbook, ansible-galaxy] | ||
known_good_version: 10.6.0 | ||
|
||
downloads: | ||
- name: bazelisk | ||
|
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 |
---|---|---|
|
@@ -20,5 +20,6 @@ | |
"files.exclude": { | ||
"**/bazel-*": true, | ||
"haos/custom_components/hacs/**/*": true | ||
} | ||
}, | ||
"trunk.autoInit": false | ||
} |
This file was deleted.
Oops, something went wrong.
Empty file.
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_python_interpreter: /usr/bin/python | ||
ansible_user: root | ||
ansible_become: false | ||
ansible_remote_tmp: /tmp/ |
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 @@ | ||
[provisioner] | ||
provisioner |
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: provisioner | ||
roles: | ||
- pikvm |
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,28 @@ | ||
- name: Update PiKVM | ||
block: | ||
- name: Remount read-write to prepare for changes | ||
ansible.builtin.command: rw | ||
changed_when: false | ||
when: not ansible_check_mode | ||
|
||
- name: Generate PiKVM config | ||
ansible.builtin.template: | ||
src: meta.yml.j2 | ||
dest: /etc/kvmd/meta.yaml | ||
group: root | ||
owner: root | ||
mode: "0644" | ||
vars: | ||
pikvm_hostname: "{{ ansible_hostname }}" | ||
|
||
rescue: | ||
- name: Something went wrong | ||
ansible.builtin.debug: | ||
msg: An error occured | ||
when: not ansible_check_mode | ||
|
||
always: | ||
- name: Remount read-only | ||
ansible.builtin.command: ro | ||
changed_when: false | ||
when: not ansible_check_mode |
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,9 @@ | ||
# You can write down any information and it will be available | ||
# at the address /api/info (if you use default nginx config). | ||
# If server.host (str) will be defined then this value | ||
# will be displayed in the web interface. | ||
|
||
server: | ||
host: {{ pikvm_hostname }} | ||
|
||
kvm: {} |
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 @@ | ||
--- | ||
- import_playbook: provisioner.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