mirror of
https://github.com/ruanbekker/rpi-ansible.git
synced 2026-09-05 05:50:41 +02:00
added table of rpi hardware revs to dress up motd
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user