Added watchdog set function
This commit is contained in:
parent
aa7627f2e5
commit
5dc328b1aa
28
home_linux/enable_watchdog.yaml
Normal file
28
home_linux/enable_watchdog.yaml
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
---
|
||||||
|
- name: Enable hardware watchdog
|
||||||
|
hosts: all
|
||||||
|
gather_facts: no
|
||||||
|
roles:
|
||||||
|
- common
|
||||||
|
become: yes
|
||||||
|
|
||||||
|
tasks:
|
||||||
|
- name: Enable systemd watchdog in system.conf
|
||||||
|
ansible.builtin.lineinfile:
|
||||||
|
path: /etc/systemd/system.conf
|
||||||
|
regexp: '^#?{{ item.key }}='
|
||||||
|
line: "{{ item.key }}={{ item.value }}"
|
||||||
|
loop:
|
||||||
|
- { key: 'RuntimeWatchdogSec', value: '15' }
|
||||||
|
- { key: 'RebootWatchdogSec', value: '10min' }
|
||||||
|
notify: Restart systemd
|
||||||
|
|
||||||
|
- name: Ensure watchdog device permissions (Optional/Standard)
|
||||||
|
ansible.builtin.shell: |
|
||||||
|
modprobe bcm2835_wdt
|
||||||
|
changed_when: false
|
||||||
|
|
||||||
|
handlers:
|
||||||
|
- name: Restart systemd
|
||||||
|
ansible.builtin.systemd:
|
||||||
|
daemon_reexec: yes
|
||||||
20
home_linux/install_longhorn_deps.yml
Normal file
20
home_linux/install_longhorn_deps.yml
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
---
|
||||||
|
- name: Update and upgrade packages on Raspberries
|
||||||
|
hosts: kubernetes
|
||||||
|
roles:
|
||||||
|
- common
|
||||||
|
become: yes
|
||||||
|
|
||||||
|
tasks:
|
||||||
|
|
||||||
|
- name: Update package repositories
|
||||||
|
apt: update_cache=yes force_apt_get=yes cache_valid_time=3600
|
||||||
|
|
||||||
|
- name: Upgrade packages on targets
|
||||||
|
apt: upgrade=dist force_apt_get=yes
|
||||||
|
|
||||||
|
- name: Install open-iscsi
|
||||||
|
apt:
|
||||||
|
name: open-iscsi
|
||||||
|
state: present
|
||||||
|
|
||||||
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
- name: Disable swap on Raspberries
|
- name: Disable swap on Raspberries
|
||||||
hosts: all
|
hosts: kubernetes
|
||||||
roles:
|
roles:
|
||||||
- common
|
- common
|
||||||
become: yes
|
become: yes
|
||||||
@ -8,8 +8,14 @@
|
|||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
|
|
||||||
- name: Disable swap
|
- name: Stop swap service
|
||||||
ansible.builtin.shell: sudo swapoff -a
|
ansible.builtin.shell: dphys-swapfile swapoff
|
||||||
|
|
||||||
|
- name: Disable swap service
|
||||||
|
ansible.builtin.shell: systemctl disable dphys-swapfile
|
||||||
|
|
||||||
|
- name: Delete swap file
|
||||||
|
ansible.builtin.shell: dphys-swapfile uninstall
|
||||||
|
|
||||||
- name: Reboot
|
- name: Reboot
|
||||||
ansible.builtin.reboot:
|
ansible.builtin.reboot:
|
||||||
|
|||||||
@ -1,10 +1,10 @@
|
|||||||
$ANSIBLE_VAULT;1.1;AES256
|
$ANSIBLE_VAULT;1.1;AES256
|
||||||
34323466633533666237623830316138373237326134336236613536633664373564633163613230
|
30633834386366326437646166323334396138353739343932333030646534663939353664623132
|
||||||
3938393338663632613061646365613630373635613536360a613039306363616432633030306334
|
3132376461376265646335333462306135643361343366620a633835303133306134613433313833
|
||||||
33353839346339393965616234323561306338626533363238306662383938626364303061633332
|
38323961306433633466643139666566636365313538313062636161373130313633393265313162
|
||||||
6230623361393438610a383230376431373034306331376536313831633366373665393866373338
|
3537633336316361330a323462613431363138363035383532636166613434393661663832616532
|
||||||
65313334623131323931353436623265623033396266623364313934383865386532623630336164
|
63633632383431653930363638326237663533316632666266653734396165393130386238323661
|
||||||
32653432613065303363303730353864353739633530376637333662303134613339353062303932
|
65653832343031356130303961333134656139306165666234343737386362343939376435663332
|
||||||
33646466383561373264333734626364663763393766666664653365386230393562626563376265
|
64366535366265366532393130363862376363323664666362663663613238653564613963616138
|
||||||
63303939363932636266303566363062643166343064343762313339353839326361383062653036
|
33383635373133343032313834376232623166393161616136663566303437656536376536646439
|
||||||
6232
|
3163
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user