Move motd to candy-state, edit salt-minion config

This commit is contained in:
LinuxSquare 2023-09-30 11:38:03 +02:00
parent 35da420376
commit 5f432e16c9
6 changed files with 19 additions and 14 deletions

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
system/files/systemupdate.sh

View file

@ -7,6 +7,7 @@ system_base_pkgs:
- jq
- vim
- git
- findmnt
system_base_bin_dir:
file.directory:
@ -35,17 +36,4 @@ system_base_os-release:
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_NAME: {{ salt['cmd.shell']('grep -E ^PRETTY_NAME /etc/os-release | cut -d= -f2') }}
OS_VERSION: {{ salt['cmd.shell']('grep -E ^VERSION_ID /etc/os-release | cut -d= -f2') }}
OS_ISSUE_URL: {{ salt['cmd.shell']('grep -E ^BUG_REPORT_URL /etc/os-release | cut -d= -f2') }}
- user: root
- group: root
- mode: '0644'

12
system/candy.sls Normal file
View file

@ -0,0 +1,12 @@
system_candy_motd:
file.managed:
- name: /etc/motd
- source: salt://{{ tpldir }}/files/candy_motd.jinja
- template: jinja
- context:
OS_NAME: {{ salt['cmd.shell']('grep -E ^PRETTY_NAME /etc/os-release | cut -d= -f2') }}
OS_VERSION: {{ salt['cmd.shell']('grep -E ^VERSION_ID /etc/os-release | cut -d= -f2') }}
OS_ISSUE_URL: {{ salt['cmd.shell']('grep -E ^BUG_REPORT_URL /etc/os-release | cut -d= -f2') }}
- user: root
- group: root
- mode: '0644'

View file

@ -1,7 +1,10 @@
---
state_verbose: False
file_client: local
file_roots:
base:
- /srv/salt
state_verbose: false
pillar_roots:
base:
- /srv/pillar
...

View file

@ -7,3 +7,4 @@ include:
- .user
- .shell
- .salt
- .candy