-
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(ci): introduce github actions for ansible
- Loading branch information
Showing
25 changed files
with
198 additions
and
154 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,9 @@ | ||
--- | ||
# .ansible-lint | ||
|
||
exclude_paths: | ||
- .github/ | ||
- snowflake/ | ||
|
||
use_default_rules: true | ||
offline: false |
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: Ansible | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
jobs: | ||
lint: | ||
name: Ansible Lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Run ansible-lint | ||
uses: ansible/ansible-lint@main |
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,3 +1,5 @@ | ||
.vscode | ||
venv | ||
roles/firewall/files/dnsd | ||
cmd/dnsd/dnsd | ||
roles/firewall/files/nfguard | ||
|
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 |
---|---|---|
|
@@ -6,4 +6,4 @@ all: | |
forwarding: 1 | ||
hosts: | ||
fd5d:2ddd:f4a5::1: | ||
hostname: puremini | ||
hostname: puremini |
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 @@ | ||
--- | ||
|
||
collections: | ||
- ansible.posix |
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,21 +1,25 @@ | ||
--- | ||
|
||
- name: Update grub | ||
shell: update-grub | ||
ansible.builtin.command: | ||
cmd: /usr/sbin/update-grub | ||
listen: update grub | ||
changed_when: false | ||
|
||
- name: Reload .network and .netdev files | ||
shell: networkctl reload | ||
ansible.builtin.command: | ||
cmd: /usr/bin/networkctl reload | ||
listen: networkctl reload | ||
|
||
- name: Daemon reload | ||
shell: systemctl daemon-reload | ||
listen: daemon-reload | ||
changed_when: false | ||
|
||
- name: Restart resolved | ||
shell: systemctl restart systemd-resolved | ||
ansible.builtin.systemd: | ||
name: systemd-resolved.service | ||
state: restarted | ||
listen: restart resolved | ||
|
||
- name: Restart timesyncd | ||
shell: systemctl restart systemd-timesyncd | ||
listen: restart ntp | ||
ansible.builtin.systemd: | ||
name: systemd-timesyncd.service | ||
state: restarted | ||
listen: restart ntp |
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,32 +1,32 @@ | ||
--- | ||
|
||
- name: Install systemd-resolved | ||
apt: | ||
ansible.builtin.apt: | ||
name: systemd-resolved | ||
state: present | ||
tags: dns | ||
|
||
- name: Setup systemd-resolved | ||
template: | ||
ansible.builtin.template: | ||
src: resolved.conf.j2 | ||
dest: "{{ systemd_prefix }}/resolved.conf" | ||
owner: root | ||
group: root | ||
mode: 0644 | ||
mode: '0644' | ||
notify: restart resolved | ||
tags: dns | ||
|
||
- name: Enable systemd-resolved | ||
systemd: | ||
ansible.builtin.systemd: | ||
name: systemd-resolved.service | ||
state: started | ||
enabled: yes | ||
masked: no | ||
enabled: true | ||
masked: false | ||
tags: dns | ||
|
||
- name: Setup resolv.conf | ||
file: | ||
ansible.builtin.file: | ||
src: /var/run/systemd/resolve/stub-resolv.conf | ||
dest: /etc/resolv.conf | ||
state: link | ||
tags: dns | ||
tags: dns |
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 |
---|---|---|
@@ -1,16 +1,16 @@ | ||
--- | ||
|
||
- name: Initialize the system | ||
import_tasks: init.yml | ||
ansible.builtin.import_tasks: init.yml | ||
|
||
- name: Customize the FHS | ||
import_tasks: fhs.yml | ||
ansible.builtin.import_tasks: fhs.yml | ||
|
||
- name: Initialize the network | ||
import_tasks: network.yml | ||
ansible.builtin.import_tasks: network.yml | ||
|
||
- name: Setup dns | ||
import_tasks: dns.yml | ||
ansible.builtin.import_tasks: dns.yml | ||
|
||
- name: Setup ntp | ||
import_tasks: ntp.yml | ||
ansible.builtin.import_tasks: ntp.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
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,25 +1,25 @@ | ||
--- | ||
|
||
- name: Install timesyncd | ||
apt: | ||
ansible.builtin.apt: | ||
name: systemd-timesyncd | ||
state: present | ||
tags: ntp | ||
|
||
- name: Setup timesyncd.conf | ||
template: | ||
ansible.builtin.template: | ||
src: timesyncd.conf.j2 | ||
dest: "{{ systemd_prefix }}/timesyncd.conf" | ||
owner: root | ||
group: root | ||
mode: 0644 | ||
mode: '0644' | ||
notify: restart ntp | ||
tags: ntp | ||
|
||
- name: Enable timesyncd | ||
systemd: | ||
ansible.builtin.systemd: | ||
name: systemd-timesyncd.service | ||
state: started | ||
enabled: yes | ||
masked: no | ||
tags: ntp | ||
enabled: true | ||
masked: false | ||
tags: ntp |
Oops, something went wrong.