added table of rpi hardware revs to dress up motd

This commit is contained in:
Glenn K. Lockwood
2020-07-26 22:05:21 -07:00
parent 8bb39632fd
commit 50e1b1ec19
4 changed files with 275 additions and 11 deletions
+12 -1
View File
@@ -12,6 +12,7 @@
- raspi
- sw
- sshd
- motd
- name: store MAC address
set_fact:
@@ -20,6 +21,7 @@
- raspi
- sw
- sshd
- motd
- name: store system configuration
set_fact:
@@ -28,6 +30,7 @@
- raspi
- sw
- sshd
- motd
- name: set hostname
shell: "raspi-config nonint do_hostname {{ myconfig.hostname }}"
@@ -90,13 +93,21 @@
when: "'darshan_dev' in myconfig and myconfig.darshan_dev"
# Install motd
- name: install MOTD
- name: load Raspberry Pi hardware history
include_vars:
file: vars/raspi-models.yml
tags:
- motd
- name: install motd
template:
src: etc/motd
dest: /etc/motd
owner: root
group: root
mode: "0644"
tags:
- motd
# Configure firewall
- name: allow SSH through UFW
+19 -1
View File
@@ -191,7 +191,16 @@
tags:
- raspi
- name: set raspi-config facts
- name: get Raspberry Pi revision info
command: awk '/^Revision/ {print $3}' /proc/cpuinfo
register: raspi_rev
changed_when: False
check_mode: no
tags:
- raspi
- motd
- name: set raspi-config facts (all)
set_fact:
raspi_type: "{{ raspi_type.stdout }}"
raspi_hostname: "{{ raspi_hostname.stdout }}"
@@ -216,6 +225,15 @@
raspi_gpu_mem_256: "{{ raspi_gpu_mem_256.stdout }}"
raspi_gpu_mem_512: "{{ raspi_gpu_mem_512.stdout }}"
raspi_gpu_mem_1024: "{{ raspi_gpu_mem_1024.stdout }}"
raspi_rev: "{{ raspi_rev.stdout }}"
check_mode: no
tags:
- raspi
- name: set raspi-config facts (for motd)
set_fact:
raspi_rev: "{{ raspi_rev.stdout }}"
check_mode: no
tags:
- raspi
- motd