-
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.
- Loading branch information
1 parent
3760293
commit 9550a2e
Showing
10 changed files
with
135 additions
and
31 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,8 @@ | ||
--- | ||
|
||
profile: production | ||
|
||
skip_list: | ||
- name[casing] | ||
|
||
... |
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,20 @@ | ||
--- | ||
|
||
name: ansible | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
- wip/next | ||
|
||
jobs: | ||
|
||
ansible-lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ansible/ansible-lint@v25 | ||
|
||
... |
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,31 @@ | ||
--- | ||
|
||
name: review | ||
|
||
on: [pull_request] | ||
|
||
jobs: | ||
|
||
yamllint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: reviewdog/action-yamllint@v1 | ||
with: | ||
github_token: ${{ secrets.github_token }} | ||
reporter: github-pr-review | ||
yamllint_flags: '.' | ||
|
||
ansible-lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.x | ||
- uses: reviewdog/action-ansiblelint@v1 | ||
with: | ||
github_token: ${{ secrets.github_token }} | ||
reporter: github-pr-review | ||
|
||
... |
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 @@ | ||
/.ansible/ |
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,46 @@ | ||
--- | ||
|
||
yaml-files: | ||
- '*.yaml' | ||
- '*.yml' | ||
- '.yamllint' | ||
- '.ansible-lint' | ||
|
||
extends: default | ||
|
||
rules: | ||
braces: | ||
min-spaces-inside: 0 | ||
max-spaces-inside: 1 | ||
brackets: | ||
max-spaces-inside: 1 | ||
colons: | ||
max-spaces-after: -1 | ||
commas: | ||
min-spaces-after: 1 | ||
max-spaces-after: -1 | ||
comments: | ||
require-starting-space: yes | ||
min-spaces-from-content: 1 | ||
comments-indentation: no | ||
document-start: | ||
present: yes | ||
document-end: | ||
present: yes | ||
empty-lines: | ||
max: 1 | ||
key-duplicates: enable | ||
line-length: | ||
max: 79 | ||
new-lines: | ||
type: unix | ||
octal-values: | ||
forbid-implicit-octal: yes | ||
forbid-explicit-octal: yes | ||
truthy: | ||
allowed-values: ['yes', 'no'] | ||
check-keys: no | ||
ignore: >- | ||
.github/workflows | ||
|
||
... |
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 |
---|---|---|
@@ -1,5 +1,7 @@ | ||
--- | ||
# defaults file for ansible_role_screen_switch | ||
|
||
screen_switch_on_time: '06:00:00' | ||
screen_switch_standby_time: '21:00:00' | ||
screen_switch_cec_supported: true | ||
screen_switch_cec_supported: yes | ||
|
||
... |
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,4 +1,7 @@ | ||
--- | ||
|
||
- name: reload systemd | ||
systemd: | ||
ansible.builtin.systemd: | ||
daemon_reload: yes | ||
|
||
... |
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 |
---|---|---|
@@ -1,46 +1,47 @@ | ||
--- | ||
# tasks file for ansible-role-screen-switch | ||
|
||
- name: install cec-utils to control screen | ||
apt: | ||
ansible.builtin.apt: | ||
name: cec-utils | ||
when: screen_switch_cec_supported | ||
|
||
- name: copy screen control script | ||
template: | ||
ansible.builtin.template: | ||
src: screen_switch.sh.j2 | ||
dest: /usr/local/bin/screen_switch.sh | ||
owner: root | ||
group: root | ||
mode: 0755 | ||
mode: '0755' | ||
|
||
- name: copy screen switch systemd template | ||
copy: | ||
ansible.builtin.copy: | ||
src: [email protected] | ||
dest: /etc/systemd/system/ | ||
owner: root | ||
group: root | ||
mode: 0644 | ||
mode: '0644' | ||
notify: reload systemd | ||
|
||
- name: create timers from templates | ||
template: | ||
ansible.builtin.template: | ||
src: "{{ item }}.j2" | ||
dest: "/etc/systemd/system/{{ item }}" | ||
owner: root | ||
group: root | ||
mode: 0644 | ||
mode: '0644' | ||
with_items: | ||
- screen_on.timer | ||
- screen_standby.timer | ||
notify: reload systemd | ||
|
||
- name: enable screen control services | ||
systemd: | ||
ansible.builtin.systemd: | ||
name: "{{ item.unit }}" | ||
enabled: yes | ||
state: started | ||
with_items: | ||
- unit: screen_on.timer | ||
- unit: screen_standby.timer | ||
notify: reload systemd | ||
|
||
... |