Add os-release, add motd
This commit is contained in:
parent
0d35bc4902
commit
c8c08e774a
3 changed files with 46 additions and 1 deletions
|
@ -25,3 +25,28 @@ system_base_apps_dir:
|
||||||
- group: root
|
- group: root
|
||||||
- dir_mode: '0755'
|
- dir_mode: '0755'
|
||||||
- file_mode: '0644'
|
- file_mode: '0644'
|
||||||
|
|
||||||
|
system_base_os-release:
|
||||||
|
file.managed:
|
||||||
|
- name: /etc/os-release
|
||||||
|
- source: salt://{{ tpldir }}/files/base_os-release.jinja
|
||||||
|
- template: jinja
|
||||||
|
- context:
|
||||||
|
OS_VERSION: {{ salt['cmd.shell']('date "+%Y%m"') }}
|
||||||
|
- user: root
|
||||||
|
- group: root
|
||||||
|
- mode: '0644'
|
||||||
|
|
||||||
|
system_base_motd:
|
||||||
|
file.managed:
|
||||||
|
- name: /etc/motd
|
||||||
|
- source: salt://{{ tpldir }}/files/base_motd.jinja
|
||||||
|
- template: jinja
|
||||||
|
- context:
|
||||||
|
OS: {{ salt['cmd.shell']('grep -E ^NAME /etc/os-release | cut -d= -f2 | sed \'s|"||g\'') }}
|
||||||
|
OS_VERSION: {{ salt['cmd.shell']('grep -E ^VERSION_ID /etc/os-release | cut -d= -f2 | sed \'s|"||g\'') }}
|
||||||
|
- user: root
|
||||||
|
- group: root
|
||||||
|
- mode: '0644'
|
||||||
|
- require:
|
||||||
|
- system_base_os-release
|
13
system/files/base_motd.jinja
Normal file
13
system/files/base_motd.jinja
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
╔═══════════════════════════════════════════════╗
|
||||||
|
║ Velkommen til ║
|
||||||
|
║ _ _ _ ║
|
||||||
|
║ | \ | | (_) ║
|
||||||
|
║ | \| | _____ _____ _ __ _ __ _ ║
|
||||||
|
║ | . ` |/ _ \ \ / / _ \ '__| |/ _` | ║
|
||||||
|
║ | |\ | (_) \ V / __/ | | | (_| | ║
|
||||||
|
║ |_| \_|\___/ \_/ \___|_| |_|\__,_| ║
|
||||||
|
║ ║
|
||||||
|
╚═══════════════════════════════════════════════╝
|
||||||
|
|
||||||
|
OS: {{ OS }}
|
||||||
|
Version: {{ OS_VERSION }}
|
7
system/files/base_os-release.jinja
Normal file
7
system/files/base_os-release.jinja
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
NAME="NoveriaOS"
|
||||||
|
ID=noveriaos
|
||||||
|
ID_LIKE=alpine
|
||||||
|
VERSION_ID="{{ OS_VERSION }}"
|
||||||
|
PRETTY_NAME="NoveriaOS {{ OS_VERSION }}"
|
||||||
|
HOME_URL="https://noveria.org"
|
||||||
|
BUG_REPORT_URL="https://git.noveria.org/NoveriaOS/iso/issues"
|
Loading…
Reference in a new issue