forked from Controls/gitea-pages
reshuffling info to puppet
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
``grub2``
|
||||
=========
|
||||
|
||||
This module provides a defined type to configure kernel arguments in grub2.
|
||||
|
||||
|
||||
Defined Types
|
||||
-------------
|
||||
|
||||
|
||||
``grub2::kernel_arg``
|
||||
~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Modify a kernel argument.
|
||||
|
||||
Parameters:
|
||||
|
||||
- ``action``: one of 'add' and 'remove'
|
||||
- ``value``: specifies the value for arguments of the form ``arg=value``, e.g.
|
||||
``crashkernel=auto``.
|
||||
@@ -0,0 +1,156 @@
|
||||
``logrotate``
|
||||
=============
|
||||
|
||||
This module configures ``logrotate``. Further information an examples can be
|
||||
found in the following link:
|
||||
|
||||
* https://git.psi.ch/linux-infra/voxpupuli-logrotate
|
||||
|
||||
Main class ``logrotate`` can be called, but usually calling just a rule ``logrotate::rule``
|
||||
should be enough to automatically configure ``logrotate`` in the host. It will use the
|
||||
default values for this class, which is placing all the default ``rules`` from the O.S.
|
||||
to the ``/etc/logrotate.d`` directory.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
|
||||
All available parameters are::
|
||||
|
||||
namevar - The String name of the rule.
|
||||
path - The path String to the logfile(s) to be rotated.
|
||||
ensure - The desired state of the logrotate rule as a String. Valid
|
||||
values are 'absent' and 'present' (default: 'present').
|
||||
compress - A Boolean value specifying whether the rotated logs should
|
||||
be compressed (optional).
|
||||
compresscmd - The command String that should be executed to compress the
|
||||
rotated logs (optional).
|
||||
compressext - The extention String to be appended to the rotated log files
|
||||
after they have been compressed (optional).
|
||||
compressoptions - A String of command line options to be passed to the
|
||||
compression program specified in `compresscmd` (optional).
|
||||
copy - A Boolean specifying whether logrotate should just take a
|
||||
copy of the log file and not touch the original (optional).
|
||||
copytruncate - A Boolean specifying whether logrotate should truncate the
|
||||
original log file after taking a copy (optional).
|
||||
create - A Boolean specifying whether logrotate should create a new
|
||||
log file immediately after rotation (optional).
|
||||
create_mode - An octal mode String logrotate should apply to the newly
|
||||
created log file if create => true (optional).
|
||||
create_owner - A username String that logrotate should set the owner of the
|
||||
newly created log file to if create => true (optional).
|
||||
create_group - A String group name that logrotate should apply to the newly
|
||||
created log file if create => true (optional).
|
||||
dateext - A Boolean specifying whether rotated log files should be
|
||||
archived by adding a date extension rather just a number
|
||||
(optional).
|
||||
dateformat - The format String to be used for `dateext` (optional).
|
||||
Valid specifiers are '%Y', '%m', '%d' and '%s'.
|
||||
dateyesterday - A Boolean specifying whether to use yesterday's date instead
|
||||
of today's date to create the `dateext` extension (optional).
|
||||
delaycompress - A Boolean specifying whether compression of the rotated
|
||||
log file should be delayed until the next logrotate run
|
||||
(optional).
|
||||
extension - Log files with this extension String are allowed to keep it
|
||||
after rotation (optional).
|
||||
ifempty - A Boolean specifying whether the log file should be rotated
|
||||
even if it is empty (optional).
|
||||
mail - The email address String that logs that are about to be
|
||||
rotated out of existence are emailed to (optional).
|
||||
mailfirst - A Boolean that when used with `mail` has logrotate email the
|
||||
just rotated file rather than the about to expire file
|
||||
(optional).
|
||||
maillast - A Boolean that when used with `mail` has logrotate email the
|
||||
about to expire file rather than the just rotated file
|
||||
(optional).
|
||||
maxage - The Integer maximum number of days that a rotated log file
|
||||
can stay on the system (optional).
|
||||
minsize - The String minimum size a log file must be to be rotated,
|
||||
but not before the scheduled rotation time (optional).
|
||||
The default units are bytes, append k, M or G for kilobytes,
|
||||
megabytes and gigabytes respectively.
|
||||
maxsize - The String maximum size a log file may be to be rotated;
|
||||
When maxsize is used, both the size and timestamp of a log
|
||||
file are considered for rotation.
|
||||
The default units are bytes, append k, M or G for kilobytes,
|
||||
megabytes and gigabytes respectively.
|
||||
missingok - A Boolean specifying whether logrotate should ignore missing
|
||||
log files or issue an error (optional).
|
||||
olddir - A String path to a directory that rotated logs should be
|
||||
moved to (optional).
|
||||
postrotate - A command String that should be executed by /bin/sh after
|
||||
the log file is rotated (optional).
|
||||
prerotate - A command String that should be executed by /bin/sh before
|
||||
the log file is rotated and only if it will be rotated
|
||||
(optional).
|
||||
firstaction - A command String that should be executed by /bin/sh once
|
||||
before all log files that match the wildcard pattern are
|
||||
rotated (optional).
|
||||
lastaction - A command String that should be execute by /bin/sh once
|
||||
after all the log files that match the wildcard pattern are
|
||||
rotated (optional).
|
||||
rotate - The Integer number of rotated log files to keep on disk
|
||||
(optional).
|
||||
rotate_every - How often the log files should be rotated as a String.
|
||||
Valid values are 'hour', 'day', 'week', 'month' and 'year'
|
||||
(optional). Please note, older versions of logrotate do not
|
||||
support yearly log rotation.
|
||||
size - The String size a log file has to reach before it will be
|
||||
rotated (optional). The default units are bytes, append k,
|
||||
M or G for kilobytes, megabytes or gigabytes respectively.
|
||||
sharedscripts - A Boolean specifying whether logrotate should run the
|
||||
postrotate and prerotate scripts for each matching file or
|
||||
just once (optional).
|
||||
shred - A Boolean specifying whether logs should be deleted with
|
||||
shred instead of unlink (optional).
|
||||
shredcycles - The Integer number of times shred should overwrite log files
|
||||
before unlinking them (optional).
|
||||
start - The Integer number to be used as the base for the extensions
|
||||
appended to the rotated log files (optional).
|
||||
su_owner - A username String that logrotate should use to rotate a
|
||||
log file set instead of using the default if
|
||||
su => true (optional).
|
||||
su_group - A String group name that logrotate should use to rotate a
|
||||
log file set instead of using the default if
|
||||
su => true (optional).
|
||||
uncompresscmd - The String command to be used to uncompress log files
|
||||
(optional).
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
Configure ``logrotate.conf``::
|
||||
|
||||
logrotate::conf { '/etc/logrotate.conf':
|
||||
rotate => 10,
|
||||
rotate_every => 'week',
|
||||
ifempty => true,
|
||||
dateext => true,
|
||||
}
|
||||
|
||||
|
||||
Rule for rotating ``messages``::
|
||||
|
||||
logrotate::rule { 'messages':
|
||||
path => '/var/log/messages',
|
||||
rotate => 5,
|
||||
rotate_every => 'week',
|
||||
postrotate => '/usr/bin/killall -HUP syslogd',
|
||||
}
|
||||
|
||||
|
||||
Rule for rotating ``slurmd`` client::
|
||||
|
||||
logrotate::rule { 'slurmd':
|
||||
path => '/var/log/slurm/slurmd.log',
|
||||
rotate => $rotate,
|
||||
rotate_every => $rotate_every,
|
||||
compress => true,
|
||||
create => true,
|
||||
create_mode => '0600',
|
||||
create_owner => 'slurm',
|
||||
create_group => 'slurm',
|
||||
missingok => true,
|
||||
ifempty => false,
|
||||
sharedscripts => true,
|
||||
postrotate => '/bin/systemctl reload slurmd.service > /dev/null 2>/dev/null || true';
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
``selinux``
|
||||
===========
|
||||
|
||||
This module configures :doc:`selinux`. It allows configuring the SELinux mode
|
||||
as well as setting SELinux booleans.
|
||||
|
||||
|
||||
Parameters
|
||||
----------
|
||||
|
||||
``selinux_mode``
|
||||
~~~~~~~~~~~~~~~~
|
||||
|
||||
Acceptable values are ``enforcing``, ``permissive``, and ``disabled``. The
|
||||
module configures this mode for the next reboot. It also sets it right away
|
||||
unless the mode to be configured is ``disabled`` or SELinux is currently
|
||||
disabled. In the former case the current mode is set to ``permissive``. In the
|
||||
latter case nothing is done before the next reboot.
|
||||
|
||||
|
||||
Defined Types
|
||||
-------------
|
||||
|
||||
``set_sebool``
|
||||
~~~~~~~~~~~~~~
|
||||
|
||||
Sets the SELinux boolean specified as the resource title unless SELinux is
|
||||
disabled, in which case it does nothing.
|
||||
|
||||
Parameters:
|
||||
|
||||
- ``enable``
|
||||
|
||||
If true, the boolean is set to ``on``. If false, the boolean is set to
|
||||
``off``.
|
||||
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
Allow httpd to access user's home directories::
|
||||
|
||||
selinux::set_sebool {'httpd_enable_homedirs': enable => true }
|
||||
@@ -0,0 +1,25 @@
|
||||
``sudo``
|
||||
========
|
||||
|
||||
This module installs and configures ``sudo(8)``.
|
||||
This is only internal documentation, Hiera configuration is done in the :doc:`aaa profile<../profiles/aaa>`.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
|
||||
|
||||
``allow_sudoers_d``
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
This boolean determines whether the files in ``/etc/sudoers.d/`` are included in
|
||||
the sudo configuration.
|
||||
|
||||
|
||||
Defined types
|
||||
-------------
|
||||
|
||||
``sudo::rules``
|
||||
~~~~~~~~~~~~~~~
|
||||
|
||||
This defined type accepts a parameter ``rules``, which is an array of strings to
|
||||
be added to ``/etc/sudoers``.
|
||||
@@ -0,0 +1,18 @@
|
||||
``sysctl``
|
||||
===========
|
||||
|
||||
This module configures ``sysctl``. Further information an examples can be
|
||||
found in the official page:
|
||||
|
||||
* https://forge.puppet.com/tpdownes/sysctl
|
||||
|
||||
The sysctl module is called automatically so is possible to do sysctl tuning
|
||||
by configuring properly hiera using the `sysctl::values` variable, eg.::
|
||||
|
||||
sysctl::values:
|
||||
net.ipv4.tcp_slow_start_after_idle:
|
||||
value: '0'
|
||||
net.core.rmem_max:
|
||||
value: '83886080'
|
||||
net.core.wmem_max:
|
||||
value: '83886080'
|
||||
@@ -0,0 +1,77 @@
|
||||
``systemd``
|
||||
===========
|
||||
|
||||
This module provides defined types to create systemd units. It automatically
|
||||
takes care of reloading systemd when necessary, automatically generates correct
|
||||
names for ``.mount`` units, etc.
|
||||
|
||||
The parameters of defined types are usually similar to the systemd option names
|
||||
that they represent. Camel case (as used by systemd) is transformed to the
|
||||
lowercase-with-underscore style usually used with Puppet, e.g. ``OnCalendar`` in
|
||||
systemd becomes ``on_calendar``.
|
||||
|
||||
|
||||
Parameters
|
||||
----------
|
||||
|
||||
``default_target``
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
|
||||
The systemd default target, i.e. usually one of ``multi-user.target`` or
|
||||
``graphical.target``.
|
||||
|
||||
|
||||
Defined Types
|
||||
-------------
|
||||
|
||||
All units support the following parameters for the ``[Unit]`` or ``[Install]``
|
||||
sections:
|
||||
|
||||
- ``description``
|
||||
- ``wanted_by``
|
||||
|
||||
|
||||
``systemd::timer``
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Creates a timer unit.
|
||||
|
||||
Parameters:
|
||||
|
||||
- ``on_calendar``
|
||||
- ``unit``
|
||||
|
||||
|
||||
``systemd::mount``
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Creates a mount unit. The name of the unit file has to be (an encoded form of)
|
||||
the mountpoint, which is automatically generated. See ``systemd.mount(5)`` for
|
||||
details.
|
||||
|
||||
Parameters:
|
||||
|
||||
- ``what``
|
||||
- ``where``
|
||||
- ``options``
|
||||
|
||||
|
||||
``systemd.service``
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
- ``type`` (default: ``simple``)
|
||||
- ``exec_start``
|
||||
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
Defining a timer unit
|
||||
~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Timer units integrate nicely with the remaining services. They can be managed
|
||||
through ``systemctl(1)`` and their log messages can easily be accessed through
|
||||
``journalctl -u xxxxx.timer``.
|
||||
|
||||
A timer unit needs a corresponding service unit which executes the actual
|
||||
command.
|
||||
@@ -0,0 +1,24 @@
|
||||
``updatedb``
|
||||
============
|
||||
|
||||
This module manages the configuration for ``mlocate`` aka ``updatedb(8)``.
|
||||
|
||||
|
||||
Parameters
|
||||
----------
|
||||
|
||||
``enable``
|
||||
~~~~~~~~~~
|
||||
|
||||
A boolean indicating whether ``mlocate`` - ie the ``updatedb(8)`` cron job -
|
||||
should be enabled or not.
|
||||
|
||||
|
||||
Defined Types
|
||||
-------------
|
||||
|
||||
``updatedb::exclude``
|
||||
~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Takes a list of directories and makes sure that ``updatedb(8)`` ignores them
|
||||
when indexing.
|
||||
@@ -0,0 +1,32 @@
|
||||
``utils``
|
||||
=========
|
||||
|
||||
This module contains a number of utility functions used at PSI. It is the
|
||||
PSI-specific analogue to Puppetlabs' ``stdlib``.
|
||||
|
||||
|
||||
Functions
|
||||
---------
|
||||
|
||||
|
||||
``check_os``
|
||||
~~~~~~~~~~~~
|
||||
|
||||
Accepts an arbitrary number of arguments, each of which is a string of the form
|
||||
``$osfamily $majorversion`` as reported by ``facter(8)``. If the facts of the
|
||||
client system **do not** match any of the arguments, the function aborts the
|
||||
Puppet run.
|
||||
|
||||
|
||||
``rand_time``
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
This function takes a parameter specifying a time window and returns a specific
|
||||
time within this window based on the MD5 on the hostname. This allows scheduling
|
||||
cron jobs etc uniformly across a fleet of system within a given window, while
|
||||
keeping the time on each system predictable.
|
||||
|
||||
The format for the argument specifying the time window is ``HH:MM--HH:MM``. The
|
||||
window must not include midnight.
|
||||
|
||||
The format of the return value is ``HH:MM``.
|
||||
Reference in New Issue
Block a user