initial commit
This commit is contained in:
15
ansible/ansible-rpi-cluster/playbooks/reboot.yml
Executable file
15
ansible/ansible-rpi-cluster/playbooks/reboot.yml
Executable file
@@ -0,0 +1,15 @@
|
||||
---
|
||||
- name: Playbook for rebooting the RPis
|
||||
hosts: picluster
|
||||
gather_facts: no
|
||||
tasks:
|
||||
- name: 'Reboot RPi'
|
||||
shell: shutdown -r now
|
||||
async: 0
|
||||
poll: 0
|
||||
ignore_errors: true
|
||||
become: true
|
||||
|
||||
- name: "Wait for reboot to complete"
|
||||
local_action: wait_for host={{ ansible_host }} port=22 state=started delay=10
|
||||
become: false
|
||||
15
ansible/ansible-rpi-cluster/playbooks/shutdown.yml
Executable file
15
ansible/ansible-rpi-cluster/playbooks/shutdown.yml
Executable file
@@ -0,0 +1,15 @@
|
||||
---
|
||||
- name: Playbook for shutting down the RPis
|
||||
hosts: picluster
|
||||
gather_facts: no
|
||||
tasks:
|
||||
- name: 'Shutdown RPi'
|
||||
shell: shutdown -h now
|
||||
async: 0
|
||||
poll: 0
|
||||
ignore_errors: true
|
||||
become: true
|
||||
|
||||
- name: "Wait for shutdown to complete"
|
||||
local_action: wait_for host={{ ansible_host }} port=22 state=stopped
|
||||
become: false
|
||||
8
ansible/ansible-rpi-cluster/playbooks/update.yml
Executable file
8
ansible/ansible-rpi-cluster/playbooks/update.yml
Executable file
@@ -0,0 +1,8 @@
|
||||
---
|
||||
- name: Playbook for managing the updates in RPi
|
||||
hosts: picluster
|
||||
tasks:
|
||||
- name: 'Update apt package cache'
|
||||
become: yes
|
||||
apt:
|
||||
update_cache=yes
|
||||
11
ansible/ansible-rpi-cluster/playbooks/upgrade.yml
Executable file
11
ansible/ansible-rpi-cluster/playbooks/upgrade.yml
Executable file
@@ -0,0 +1,11 @@
|
||||
---
|
||||
- name: Playbook for upgrading the RPis
|
||||
hosts: picluster
|
||||
gather_facts: no
|
||||
tasks:
|
||||
- name: Update and upgrade apt packages
|
||||
become: true
|
||||
apt:
|
||||
upgrade: yes
|
||||
update_cache: yes
|
||||
cache_valid_time: 86400
|
||||
Reference in New Issue
Block a user