Compare commits

...

4 Commits

Author SHA1 Message Date
cc0e8f7aff pillar: add empty pillar and pillarstack config
Prevents the following warnings/errors in the master log:

    [ERROR   ] Root path 'pillar' not present in git_pillar remote '__env__ https://git.spritsail.io/frebib/salt.git', skipping.
    [ERROR   ] Root path 'pillar' not present in git_pillar remote '__env__ https://github.com/nerdhouse/salt.git', skipping.
    [CRITICAL] Specified ext_pillar interface gitstack is unavailable

Signed-off-by: Joe Groocock <me@frebib.net>
2020-07-19 15:37:22 +01:00
8024449e2b salt/minion: only restart salt-minion on config/pkg change
Signed-off-by: Joe Groocock <me@frebib.net>
2020-07-19 15:21:09 +01:00
37e659cfc3 users: add Docker group to admin users
Signed-off-by: Joe Groocock <me@frebib.net>
2020-07-19 15:13:34 +01:00
05d7cef80c users: manage ssh authorised keys
Signed-off-by: Joe Groocock <me@frebib.net>
2020-07-19 15:10:01 +01:00
5 changed files with 17 additions and 4 deletions

3
pillar/top.sls Normal file
View File

@ -0,0 +1,3 @@
{{ saltenv }}:
'*':
[]

1
stack/stack.cfg Normal file
View File

@ -0,0 +1 @@
[]

View File

@ -11,10 +11,10 @@ salt-minion:
restart-salt-minion:
cmd.run:
- name: "sleep 10 && systemctl restart salt-minion --no-block"
- name: sleep 10 && systemctl restart salt-minion
- bg: true
- order: last
- watch:
- onchanges:
- pkg: salt-minion
- file: /etc/salt/minion
- require:
@ -34,6 +34,7 @@ restart-salt-minion:
check-minion-config:
cmd.run:
- name: sudo salt-call --local --skip-grains test.ping
- watch:
- name: sudo salt-call --local --skip-grains test.true
- onchanges:
- pkg: salt-minion
- file: /etc/salt/minion

View File

@ -16,4 +16,9 @@
{%- if user.shell is defined %}
- shell: {{ user.shell }}
{%- endif %}
ssh_auth.manage:
- user: {{ name }}
{%- if user['ssh-keys'] is defined %}
- ssh_keys: {{ user['ssh-keys']|json }}
{%- endif %}
{%- endfor %}

View File

@ -4,6 +4,9 @@
{%- do admin_groups.append('systemd-journal') %}
{%- endif %}
{# FIXME(frebib): manage Docker group instead of blindly adding it #}
{%- do admin_groups.append('docker') %}
frebib:
groups:
{%- for group in admin_groups %}