Browse Source

Merge pull request #1 from salt-formulas/master

Upstream merge
pull/212/head
marek-knappe 5 years ago
parent
commit
f2543e8f84
No account linked to committer's email address
7 changed files with 54 additions and 4 deletions
  1. +5
    -3
      .travis.yml
  2. +12
    -0
      README.rst
  3. +6
    -0
      linux/files/journal.conf
  4. +2
    -0
      linux/system/auth/duo.sls
  5. +25
    -0
      linux/system/journal.sls
  6. +4
    -0
      linux/system/systemd.sls
  7. +0
    -1
      tests/pillar/system.sls

+ 5
- 3
.travis.yml View File

- bundle install - bundle install


env: 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=network
- PLATFORM=epcim/salt:saltstack-ubuntu-xenial-salt-2017.7 SUITE=system - 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=network
- PLATFORM=epcim/salt:saltstack-ubuntu-xenial-salt-2018.3 SUITE=system - PLATFORM=epcim/salt:saltstack-ubuntu-xenial-salt-2018.3 SUITE=system
- PLATFORM=epcim/salt:saltstack-ubuntu-xenial-salt-2018.3 SUITE=duo - 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=network
# - PLATFORM=epcim/salt:saltstack-ubuntu-bionic-salt-2017.7 SUITE=system # - 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=network
# - PLATFORM=epcim/salt:saltstack-ubuntu-bionic-salt-2018.3 SUITE=system # - 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: before_script:
- set -o pipefail - set -o pipefail
- make test | tail - make test | tail

+ 12
- 0
README.rst View File

DefaultLimitCPU: 2 DefaultLimitCPU: 2
DefaultLimitNPROC: 4 DefaultLimitNPROC: 4


Systemd journal settings:

.. code-block:: yaml

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


.. code-block:: yaml .. code-block:: yaml

+ 6
- 0
linux/files/journal.conf View File

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

+ 2
- 0
linux/system/auth/duo.sls View File

package_duo: package_duo:
pkg.installed: pkg.installed:
- name: duo-unix - name: duo-unix
- skip_verify: True



login_duo: login_duo:
file.managed: file.managed:

+ 25
- 0
linux/system/journal.sls View File

{%- 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 View File

{%- from "linux/map.jinja" import system with context %} {%- from "linux/map.jinja" import system with context %}
{%- if system.enabled and grains.get('init', None) == 'systemd' %} {%- 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 %} {%- if system.systemd.system is defined %}
linux_systemd_system_config: linux_systemd_system_config:

+ 0
- 1
tests/pillar/system.sls View File

- host1 - host1
- host2 - host2
- .local - .local

# pillars for netconsole setup # pillars for netconsole setup
netconsole: netconsole:
enabled: true enabled: true

Loading…
Cancel
Save