Przeglądaj źródła

Merge pull request #2 from salt-formulas/master

update
pull/213/head
preussal 4 lat temu
rodzic
commit
1c27d9635b
Brak konta powiązanego z adresem e-mail autora
10 zmienionych plików z 60 dodań i 5 usunięć
  1. +5
    -3
      .travis.yml
  2. +12
    -0
      README.rst
  3. +6
    -0
      linux/files/journal.conf
  4. +3
    -0
      linux/map.jinja
  5. +1
    -1
      linux/storage/mount.sls
  6. +2
    -0
      linux/system/auth/duo.sls
  7. +2
    -0
      linux/system/directory.sls
  8. +25
    -0
      linux/system/journal.sls
  9. +4
    -0
      linux/system/systemd.sls
  10. +0
    -1
      tests/pillar/system.sls

+ 5
- 3
.travis.yml Wyświetl plik

@@ -26,18 +26,20 @@ install:
- bundle install

env:
- PLATFORM=epcim/salt:saltstack-ubuntu-xenial-salt-2016.3 SUITE=network
- PLATFORM=epcim/salt:saltstack-ubuntu-xenial-salt-2016.3 SUITE=system
- PLATFORM=epcim/salt:saltstack-ubuntu-xenial-salt-2017.7 SUITE=network
- PLATFORM=epcim/salt:saltstack-ubuntu-xenial-salt-2017.7 SUITE=system
- PLATFORM=epcim/salt:saltstack-ubuntu-xenial-salt-2018.3 SUITE=network
- PLATFORM=epcim/salt:saltstack-ubuntu-xenial-salt-2018.3 SUITE=system
- PLATFORM=epcim/salt:saltstack-ubuntu-xenial-salt-2018.3 SUITE=duo
- PLATFORM=netmanagers/salt-2019.2-py3:ubuntu-18.04 SUITE=network
# - PLATFORM=netmanagers/salt-2019.2-py3:ubuntu-18.04 SUITE=system
# - PLATFORM=netmanagers/salt-2019.2-py3:ubuntu-18.04 SUITE=duo
# - PLATFORM=epcim/salt:saltstack-ubuntu-bionic-salt-2017.7 SUITE=network
# - PLATFORM=epcim/salt:saltstack-ubuntu-bionic-salt-2017.7 SUITE=system
# - PLATFORM=epcim/salt:saltstack-ubuntu-bionic-salt-2018.3 SUITE=network
# - PLATFORM=epcim/salt:saltstack-ubuntu-bionic-salt-2018.3 SUITE=system

# - PLATFORM=epcim/salt:saltstack-ubuntu-xenial-salt-2016.3 SUITE=system
# - PLATFORM=epcim/salt:saltstack-ubuntu-xenial-salt-2016.3 SUITE=network
before_script:
- set -o pipefail
- make test | tail

+ 12
- 0
README.rst Wyświetl plik

@@ -430,6 +430,18 @@ Systemd settings:
DefaultLimitCPU: 2
DefaultLimitNPROC: 4

Systemd journal settings:

.. code-block:: yaml

linux:
system:
...
systemd:
journal:
SystemMaxUse: "50M"
RuntimeMaxFiles: "100"
Ensure presence of directory:

.. code-block:: yaml

+ 6
- 0
linux/files/journal.conf Wyświetl plik

@@ -0,0 +1,6 @@
{%- from "linux/map.jinja" import system with context -%}
#This file is managed by salt
[Journal]
{%- for option, value in settings.items() %}
{{ option }}={{ value }}
{%- endfor -%}

+ 3
- 0
linux/map.jinja Wyświetl plik

@@ -383,6 +383,9 @@ Debian:
},
},
}, merge=salt['grains.filter_by']({
'buster': {
'lvm_services': ['lvm2-monitor'],
},
'trusty': {
'lvm_services': ['udev'],
},

+ 1
- 1
linux/storage/mount.sls Wyświetl plik

@@ -25,7 +25,7 @@ xfs_packages_{{ mount.device }}:
{%- endif %}

{%- if mount.file_system == 'nfs' %}
linux_storage_nfs_packages:
linux_storage_nfs_packages_{{ mount.path }}:
pkg.installed:
- pkgs: {{ storage.nfs.pkgs | json }}
{%- endif %}

+ 2
- 0
linux/system/auth/duo.sls Wyświetl plik

@@ -3,6 +3,8 @@
package_duo:
pkg.installed:
- name: duo-unix
- skip_verify: True


login_duo:
file.managed:

+ 2
- 0
linux/system/directory.sls Wyświetl plik

@@ -1,5 +1,6 @@
{%- from "linux/map.jinja" import system with context %}

{%- if system.directory is defined %}
{%- for name, dir in system.directory.items() %}

{{ dir.name|default(name) }}:
@@ -13,3 +14,4 @@
{%- endif %}

{%- endfor %}
{% endif %}

+ 25
- 0
linux/system/journal.sls Wyświetl plik

@@ -0,0 +1,25 @@
{%- from "linux/map.jinja" import system with context %}
{%- if system.enabled and grains.get('init', None) == 'systemd' %}

{%- if system.systemd.journal is defined %}

linux_systemd_journal_config:
file.managed:
- name: /etc/systemd/journald.conf.d/90-salt.conf
- source: salt://linux/files/journal.conf
- template: jinja
- makedirs: True
- defaults:
settings: {{ system.systemd.journal|tojson }}
- watch_in:
- module: linux_journal_systemd_reload

linux_journal_systemd_reload:
module.wait:
- name: service.restart
- m_name: systemd-journald
- require:
- module: service.systemctl_reload

{%- endif %}
{%- endif %}

+ 4
- 0
linux/system/systemd.sls Wyświetl plik

@@ -1,5 +1,9 @@
{%- from "linux/map.jinja" import system with context %}
{%- if system.enabled and grains.get('init', None) == 'systemd' %}
{%- if system.systemd.journal is defined %}
include:
- linux.system.journal
{%- endif %}

{%- if system.systemd.system is defined %}
linux_systemd_system_config:

+ 0
- 1
tests/pillar/system.sls Wyświetl plik

@@ -458,7 +458,6 @@ linux:
- host1
- host2
- .local

# pillars for netconsole setup
netconsole:
enabled: true

Ładowanie…
Anuluj
Zapisz